0

Obscure issue for you here.

I have a Low Variable (using Playa) that contains several entries. I need to pass the entry_id for each entry to an embedded file. When I do this, the embed loads, but the {exp:channel:entries...} tag does not work.

  {exp:low_variables:pair var="newsletter_sidebars"}
    {embed="inc/get-sidebars-by-entry_id" the_entry_id="{entry_id}"}
  {/exp:low_variables:pair}

If I pass a number directly to my embed:

{embed="inc/get-sidebars-by-entry_id" the_entry_id="12"}

It works fine.

I can even see my embed is receiving the value of the Playa field.

Something to do with the dreaded parse order?

2
  • Dreaded parse order, I think so. If embed tags allowed parse="inward" you'd be OK, but I don't think they do. But also, {entry_id} is a, well, a namespace problem in many templates. What happens if you output (in plain text) {entry_id} in the low_var loop but not in the embed? Does it render?
    – jrothafer
    Jun 22, 2018 at 5:51
  • @jrothafer Outputting {entry_id} in plain text in the low_var loop does output the correct value.
    – 4midori
    Jun 25, 2018 at 15:55

2 Answers 2

0

Have you tried using the var param in the variable you are trying to output?

{exp:low_variables:pair var="newsletter_sidebars"}
    {embed="inc/get-sidebars-by-entry_id" the_entry_id="{newsletter_sidebars:entry_id}"}
{/exp:low_variables:pair}
1
  • Unfortunately that didn't work.
    – 4midori
    Jun 25, 2018 at 16:23
0

You can achieve the same embed effect but with greater control over parse order by using the embed function of {stash}.

1
  • Thanks @jcogs.eecms. The Stash documentation is a bit confusing. Can you suggest a quick way to accomplish this?
    – 4midori
    Jun 25, 2018 at 16:24

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.