Using Stash 2.3.6, EE 2.5.5, Playa 4.3.3...
I want to stash a list of related playa entries for Model1
. I want to assign the variables for Model2
based on my Model2
embed.
See {!-- THIS IS NOT BEING SET --}
below:
If I manually assign variables with {exp:stash:set}
within the playa loop, the code works fine. It is the nested embed that is failing.
Anyone have any advice for me? I love the way the code is laid out, and I want to keep it DRY.
Main landing page (EE template)
{stash:embed:layout:main}
{exp:stash:parse}
{exp:channel:entries
channel = "list"
limit = "1"
require_entry = "yes"
}
{if no_results}{redirect="404"}{/if}
{stash:embed:model:model1 process="start"}
{/exp:channel:entries}
{/exp:stash:parse}
{exp:stash:content}
{exp:stash:get_list name="list_of_related_model2" process="end"}
<li>{title} - {url_title}</li>
{/exp:stash:get_list}
{/exp:stash:content}
Model 1 (stash template)
{exp:stash:set name="title"}{title}{/exp:stash:set}
{exp:stash:set_list name="list_of_related_model2" parse_tags="yes"}
{exp:playa:children field="cf_related"}
{stash:embed:model:model2 process="start"}{!-- THIS IS NOT BEING SET --}
{/exp:playa:children}
{/exp:stash:set_list}
Model 2 (stash template)
{exp:stash:set name="title"}{title}{/exp:stash:set}
{exp:stash:set name="url_title"}{url_title}{/exp:stash:set}