Skip to content

{exp:stash:append_list}

Mark Croxton edited this page Jun 21, 2013 · 1 revision

Append an array of variables to a list to create multiple rows of variables (i.e. a multidimensional array). If the list does not exist, it will be created.

{!-- set a list of entries in the products channel with a title that starts with the letter 'C' --}
{exp:channel:entries channel="products" limit="5"}
	{exp:stash:append_list name="product_entries" match="#^C#" against="{title}"}
 		{stash:item_title}{title}{/stash:item_title}
 		{stash:item_teaser}{product_teaser}{/stash:item_teaser}
	{/exp:stash:append_list}
{/exp:channel:entries}

Parameters

Accepts the same parameters as {exp:stash:set_list}

Clone this wiki locally