Stack

Addon by Joe Tannenbaum

Stack Main Screenshot

Provides push, prepend, and stack tags to Antlers templates

Provides stack tags for Antlers templates in Statamic. Works very similarly to Blade stack directives:

Push a script onto the scripts stack:

{{ push:scripts }}

{{ /push:scripts }}

Prepend a script onto the scripts stack:

{{ prepend:scripts }}

{{ /prepend:scripts }}

Push a script onto the scripts stack, but only do it once (similar to Blade once directive):

{{ push:scripts once="true }}

{{ /push:scripts }}

Output stack:

{{ stack:scripts }}

Stacks can be named anything and you can have as many stacks as you want.