Skip to content

Bundles

Mark Croxton edited this page Jun 19, 2013 · 28 revisions

Bundles are categories for variables. There are three default bundles: default, template and static, and you are able to create your own simply by specifying a name with the bundle="" parameter when creating variables, lists and embeds.

If you are using Mustash, you can create and manage your bundles in the Control Panel interface.

bundle="default"

This is the default place for all variables and lists that you create in your templates using the set/get syntax.

bundle="template"

This is the default bundle for all stash templates embedded with the {stash:embed} tag.

bundle="static"

This is the default bundle for all variables captured by the {exp:stash:static} tag.

Basic use

{exp:stash:set name="foo" bundle="my_custom_bundle"}

Saving form data to a custom bundle

Cache-breaking

Bundles can be a useful when you need to clear a group of cached variables that are related in some way.

Clone this wiki locally