Closed thomcheezy closed 8 years ago
Please try using parse="yes"
rather than parse_tags="yes"
, since the former will parse conditionals, variables and tags whereas the later only parses tags.
thx, done. but still same behaviour.
<h1>TEST</h1>
{exp:stash:set_list name="test" parse="yes"}
{exp:channel:entries entry_id="800|803|798|799"}
{stash:url}default_url{/stash:url}
{stash:url}{url_title}{/stash:url}<!-- overwrite -->
{stash:title}{title}{/stash:title}
{/exp:channel:entries}
{/exp:stash:set_list}
{exp:stash:get_list name="test"}
TITLE FROM LIST IS: {title}<br>
{/exp:stash:get_list}
output:
You must use a conditional to remove the line you don't want. There can only be one instance of a list variable set.
<h1>TEST</h1>
{exp:stash:set_list name="test" parse="yes"}
{exp:channel:entries entry_id="800|803|798|799"}
{if cf_my_field == "something"}
{stash:url}default_url{/stash:url}
{if:else}
{stash:url}{url_title}{/stash:url}
{/if}
{stash:title}{title}{/stash:title}
{/exp:channel:entries}
{/exp:stash:set_list}
{exp:stash:get_list name="test"}
TITLE FROM LIST IS: {title}<br>
{/exp:stash:get_list}
thx. so the answer here (http://expressionengine.stackexchange.com/a/15029/7044) is wrong and is not possible?
No, that simply won't work for a list with multiple rows.
thx!
at the word HERE, instead of overwritting the stash variable (if possible?) it creates a new entry in my list. for 5 entries from channel:entries tag, I have finally 10 entries in my stash list. what I am doing wrong, or how can I overwrite vars while generating my stash list.
http://expressionengine.stackexchange.com/questions/9521/stash-how-to-overwrite-a-variable-in-set-list
Stash: 3.0.2 EE: 3.3.3
Best, Thomas