{{ 75 | money }} = $75
{{ 75 | money: 2 }} = $75.00
{{ some_value | json }}
{{ "test *string*" | textilize }} = <p>test <strong>string</strong></p>
{{ "test *string*" | textilize: false }} = test <strong>string</strong>
{{ "test space" | url_encode }} = test+space
{{ "test+space" | url_decode }} = test space
{{ "test.js" | script_tag }}
{{ "test.css" | stylesheet_tag }}
{{ "www.google.com" | link_to }} = <a href="www.google.com">www.google.com</a>
{{ "www.google.com" | link_to: Google }} = <a href="www.google.com">Google</a>
{{ "img.jpg" | image_tag }} = <img src="img.jpg" />
{{ "img.jpg" | image_tag: "An Image" }} = <img src="img.jpg" title="An Image" />
{{ "img.jpg" | image_tag: "An Image", "50x60" }} = <img src="img.jpg" title="An Image" width="50" height="60" />
{{ "img.jpg" | image_tag: nil, "50x60" }} = <img src="img.jpg" width="50" height="60" />
Assigns the paginated collection to the variable data.
{{ collection | paginate_collection: 10, 1 | assign_to: 'data' }}
{% for item in data %}
...
{% endfor %}
Uses a page parameter from the url (if set) to determine what page of the pagination to display. Ie. /vehicles?page=3
{{ vehicles | paginate }}
{{ vehicles | paginate : "anchor", "Previous vehicles", "Next Vehicles" }}
Retrieves 10 items from the collection at a time. The 1st to 10th items for the 1st call and the 11th to 20th items for the 2nd call.
{{ collection | paginate_collection: 10, 1 }}
{{ collection | paginate_collection: 10, 2 }}
An additional variable called paginate is automatically assigned when calling this method. It contains the following pagination details:
{{ paginate.total_pages }}
{{ paginate.next_page }}
If a page has been created called "test", its associated url is output.
{{ "test" | page_url }} = /path/to/page
If an asset has been created called "test", its associated path is output.
{{ "test" | asset_url }} = /public/assets/5/original/test.jpg
{{ "jquery.plugin-1.0/javascript/jquery.plugin-1.0.js" | component_url }} = /components/1/jquery.plugin-1.0/javascript/jquery.plugin-1.0.js