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.

1
  • 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. May 29, 2014 at 1:50

1 Answer 1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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