Skip to content

Instantly share code, notes, and snippets.

@croxton
Last active April 8, 2018 02:24
Show Gist options
  • Save croxton/4555990 to your computer and use it in GitHub Desktop.
Save croxton/4555990 to your computer and use it in GitHub Desktop.
stash:get_list comare var against value in a previous iteration
{exp:stash:get_list name="my_list"}
{if "{exp:stash:get name='list_var' default=''}" == "{my_list_variable}"}
do something
{/if}
{exp:stash:set name="list_var" random}{my_list_variable}{/exp:stash:set}
{/exp:stash:get_list}
{!-- note - added 'random' to the set in case {my_list_variable} has the same value in more than one row (prevents EE caching the tag) --}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment