Toggle menu

HTML

Generates HTML elements. Includes "ul", "ol" and "br".

ul

Creates an unordered list.

Parameters

hash [html attributes] - HTML attributes to use on the ul element. (Optional)

Example

collection =  [{"name": "Leela", "deliveries": 8021}, {"name": "Bender", "deliveries": 239}, {"name": "Fry", "deliveries": 1}]

{{#ul collection class="deliveries-list"}}
    {{name}} - {{inflect deliveries "delivery" "deliveries" true}}
{{/ul}}

Result

<ul class="deliveries-list">
    <li>
        Leela - 8021 deliveries
    </li>
    <li>
        Bender - 239 deliveries
    </li>
    <li>
        Fry - 1 delivery
    </li>
</ul>

ol

Same as the ul helper but creates and ordered list.

br

Returns <br> tags based on a count.

Parameters

count [int] - The number of `br` elements to render. (Optional)

Example

{{br 5}}

result

<br><br><br><br><br>

Last modified on May 31, 2022

Share this page

Facebook icon Twitter icon email icon

Print

print icon