-
Notifications
You must be signed in to change notification settings - Fork 21
{exp:stash:extend}
Inject a Stash embed into a variable or block.
Can be used as a single tag, passing parameters to the embed in the form stash:param="value":
{exp:stash:extend name="content" with="views:my_embed" stash:my_var="value"}
Or alternatively as a tag pair, appending a 4th tagpart to the tag, variables can be passed to the injected embed via {stash:var}...{/stash:var} tag pairs:
{exp:stash:extend:block name="content" with="views:my_embed"}
{stash:my_var}value{/stash:my_var}
{/exp:stash:extend:block}
The name of the native Stash variable or block that you want to extend.
The context of the Stash variable you are extending.
The Stash embed you wish to inject into the variable or block.
Pass variables to the injected Stash embed as parameters in the form stash:my_variable="value"
{exp:stash:block name="content"}
{!-- default content --}
<h1 class="entry-title">{stash:title}</h1>
{stash:body}
{/exp:stash:block}
<aside>
{stash:aside_title}
</aside>
<div class="bodycopy">
Body copy
</div>
Inject the view:_2_col template into the content block, replacing the default content and setting a value for the aside_title placeholder in the injected template:
{exp:stash:extend name="content" with="views:_2col" stash:aside_title="Sidebar"}
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