Push & Pop

The push and pop tags allow you to add/remove items in/from an array.

By default, Push & Pop work with the LIFO (Last In First Out) logic. For more information on the application of push and pop tags, please have a look at the case on the Silverfin Developers Community.

Push

Push tag will add an item at the end of your array.

{% push item to:array %}

Pop

Pop tag will remove the last item of your array and will give you the option to store this value into a variable.

{% pop array to:var %}

beginning attribute

It is possible to override the LIFO behaviour with the attribute "at:beginning" and insert/remove to/from the head rather than the tail of the array.

{% push item to:array at:beginning %}
{% pop array to:var at:beginning %}