4

A stripped down example:

{exp:stash:get_list name="sidebar" process="end"}
    {embed="templates/sidebar-events" limit="3"}
{/exp:stash:get_list}

The embed tag doesn't get parsed at all, it just prints the literal embed string. I've tried both native embeds and stash embeds, and neither of them work. Anyone know of a workaround? Maybe using priority somehow? Or parse_stage (which I don't get)?

Normally I don't use embeds but in this case I have nested channel:entries tags.

  • I'm not totally sure what the right answer is though, I think you may need parse="inwards" somewhere. Maybe on the inner or outer channel:entry tag or maybe on the get_list. – Natetronn Dec 14 '12 at 20:48
  • Also, parse_depth="2" is coming to mind as well if not parse="inwards" – Natetronn Dec 14 '12 at 21:00
  • Lastly, I guess I'm wondering why you are asking this question over say "how do I do this without using a nested channel:entries tag?" Maybe link to a gist of your template and embed would help as well. – Natetronn Dec 14 '12 at 21:06
  • Long story short: I'm using a simple relationship field that stores the entry ID (rather than the native relationship field, which doesn't work with the search: param of channel:entries). The nested channel:entries is to get the "related" entries. – Rob Sanchez Dec 14 '12 at 22:50
  • Would using Airways' new More Entries add-on allow you to do what the embed is doing without the overhead and possible parsing issues of the embed? – Ryan Masuga Dec 15 '12 at 5:12
5

Stash won't parse EE embeds at all (this is by design) so you'll need to use a Stash embed instead. When you use process="end" the tag is replaced with a marker and 'post-processed' after the EE parser has completed parsing, and then replaced into the final template output. Therefore, it is up to the post-processed tag to do any parsing that might be required of the tags that it encloses.

With that in mind, you have two options here for the stash embed: make the stash embed behave like a standard EE tag and ask get_list to parse it as a tag, or include the stash embed at the start of template processing before the EE parser replaces the wrapping get_list tag with a marker:

{exp:stash:get_list name="sidebar" process="end" parse_tags="yes"}
    {stash:embed name="sidebar-events" stash:limit="3" process="inline"}
{/exp:stash:get_list}

{exp:stash:get_list name="sidebar" process="end" parse_tags="yes"}
    {stash:embed name="sidebar-events" stash:limit="3" process="start"}
{/exp:stash:get_list}
| improve this answer | |
  • I was going to post this, but I wasn't confident in my answer. Good stuff. – Justin Kimbrell Dec 15 '12 at 18:12

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.