-
Notifications
You must be signed in to change notification settings - Fork 20
{exp:stash:context}
Mark Croxton edited this page Jun 21, 2013
·
3 revisions
Set the current context (namespace) for variables that you set/get. After setting the context, use the @
pointer to reference the namespace in your set/get code:
{exp:stash:context name="news"}
{!-- @ refers to the current context 'news' --}
{exp:stash:set name="title" context="@" type="snippet"}
My string
{/exp:stash:set}
{!-- now you can retrieve the variable in one of the following ways --}
{exp:stash:get name="title" context="@" type="snippet"}
{exp:stash:get name="title" context="news" type="snippet"}
{exp:stash:get name="@:title" type="snippet"}
{exp:stash:get name="news:title" type="snippet"}
{@:title}
The name of your context (required)
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