-
Notifications
You must be signed in to change notification settings - Fork 20
Short tag syntax
Mark Croxton edited this page Dec 13, 2016
·
5 revisions
The following shorter syntax may be used with ExpressionEngine 2.5+.
When used as a single tag, this is equivalent to {exp:stash:get name="your_var_name"}. When used as a tag pair, this is equivalent to {exp:stash:set name="your_var_name"}Hello World{/exp:stash:set}.
Alternative syntax for stash embeds.
ExpressionEngine will choke if you use the same tag as a single and as a pair in the same template:
{exp:stash:test process="end"}
{exp:stash:test}Test value{/exp:stash:test}
If you use the short tag syntax for both setting and getting variables, make sure to get a variable in a different template than the one you set it in.
Getting started
Using Stash
Using Mustash
- Mustash
- Installing Mustash
- Managing variables
- Managing bundles
- Cache-breaking rules
- Mustash plugins
- Mustash Varnish plugin
- Mustash plugin development
- Mustash API
Template design patterns
Tag reference
- {exp:stash:set}
- {exp:stash:get}
- {exp:stash:block}
- {exp:stash:set_value}
- {exp:stash:append}
- {exp:stash:append_value}
- {exp:stash:prepend}
- {exp:stash:prepend_value}
- {exp:stash:copy}
- {exp:stash:context}
- {exp:stash:is_empty}
- {exp:stash:not_empty}
- {exp:stash:set_list}
- {exp:stash:get_list}
- {exp:stash:append_list}
- {exp:stash:prepend_list}
- {exp:stash:split_list}
- {exp:stash:join_lists}
- {exp:stash:list_count}
- {exp:stash:unset}
- {exp:stash:flush_cache}
- {exp:stash:bundle}
- {stash:embed}
- {exp:stash:extend}
- {exp:stash:parse}
- {exp:stash:cache}
- {exp:stash:static}
- {exp:stash:finish}
- {exp:stash:not_found}
- Short tag syntax
- Using Stash methods in your own add-ons