Skip to content

{exp:stash:parse}

Mark Croxton edited this page Aug 13, 2014 · 6 revisions

Parse arbitrary regions of your template.

{exp:stash:parse process="inline" parse_depth="2"}
    {exp:channel:entries}
        {exp:stash:set name="my_title"}{title}{/exp:stash:set}
    {/exp:channel:entries}
{/exp:stash:parse}

{exp:stash:get name="my_title"}

Parameters

process = [ inline | end ]

When in the parse order of your EE template do you want the tags to be parsed (default='inline')

process="inline"

Parse the enclosed tagdata in the natural parse order of the template

process="end"

Parse the enclosed tagdata at the end of template parsing after other tags and variables have been parsed

priority = [ int ]

Determines the order in which the enclosed tagdata is parsed when using process="end". Lower numbers are parsed first (default="1")

parse_depth = [ int ]

How many passes of the enclosed tagdata to make by the parser? (default is 3)

unprefix = [ string ]

Prefix for common tag variables such as {if no_results}...{/if} for use in any nested tags:

{exp:stash:parse unprefix="my_prefix"}
	{exp:channel:entries channel="blog" dynamic="no"}
		{if my_prefix:no_results}no results{/if}
	{/exp:channel:entries}
{/exp:stash:set}
Clone this wiki locally