0

I've got a nested set_list that adds "tags" (which are really just relationships) to a list that the frontend then loops through.

It's set like this

{!-- SO: Grab relevant tags --}
{exp:stash:set_list:nested
  name="tags"
  context="{segment_3}"
  parse_tags="yes"
  save="yes"
  scope="site"
  refresh="120"
}
  {stash:tag}Blog{/stash:tag}
  {stash:url}/blog/{/stash:url}

  {exp:playa:children field="blog_contributor"}
    {stash:tag}{title}{/stash:tag}
    {stash:url}/contributor/{url_title}{/stash:url}
  {/exp:playa:children}

{/exp:stash:set_list:nested}
{!-- EO: Grab relevant tags --}

This works well, but only on the 2nd page refresh and after. The first time that you load the page the items set by the non-nested lists are fine but these bits are empty.

Looking at Mustash after first load it renders this:-

tag|=|Blog|&|url|=|/blog/|+|tag|=|Al Overdrive|&|url|=|/contributor/al-overdrive

But this isn't rendering on the front-end. The front-end code is

{exp:stash:get_list:nested name="tags" context="{segment_3}" scope="site"}
  <li><a href="{url}">{tag}</a></li>
{/exp:stash:get_list:nested}

I'm pretty sure I'm missing something obvious here, but any help is appreciated.

  • Dont think you've used the nested list properly. Nested list is for repeating content inside single content - ie. the playa field not the channel entry & playa field combined. You have set tags wrapped around nested yes ? Its definaltly a parse order issue but cant see the whole template logic. – stuartmcd69 May 29 '14 at 1:50
0

This was being caused because I was setting the list in the same file as I was getting it. If I moved the getting down a level by having an embed like {stash:embed:layouts:standard} which handled the UI it resolved itself.

| 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.