0

The below code works just fine on it’s own, however as soon as I drop it into a stash list and call it later in my template no results are shown. Is this a parse issue?

{exp:channel:entries channel="brand" entry_id="108"}
         {exp:playa:children field="brand-category"}
             <p>{count} - Category Name: {title} | Category URL: /products/brand/microsoft/{url_title}</p>
         {/exp:playa:children}
  {/exp:channel:entries} 

This is how it looks when stashed up:

Call Embed and Display Data:

{!-- Set Stash List --}
 {stash:embed name="_common:_data/test-category-list" stash:id="108" process="inline" parse="inwards"}

{!-- Get Stash List --}
 {exp:stash:get_list name="related-category-list"}
 {brand-name}
 {/exp:stash:get_list}

Embed File:

{exp:stash:set_list name="related-category-list" parse_tags="yes"}

 {exp:channel:entries channel="brand" entry_id="{stash:id}"}
  {exp:playa:children field="brand-category" parse="inward"}
            {stash:brand-name}{title}{/stash:brand-name}
        {/exp:playa:children}
 {/exp:channel:entries}

{/exp:stash:set_list} 
0

Resolved it just needed to increase the depth of the list to "2" within the embed. Here is the code if anyone needs it.

Embed File:

{exp:stash:set_list name="related-category-list" parse_tags="yes" parse_depth="2"}

    {exp:channel:entries channel="brand" entry_id="{stash:id}"}
        {exp:playa:children field="brand-category"}
            {stash:category-name}{title}{/stash:category-name}
            {stash:category-url}{url_title}{/stash:category-url}
        {/exp:playa:children}
    {/exp:channel:entries}

{/exp:stash:set_list}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.