All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

LV and preparsing Playa :child_ids

Sarah Tan 22 Apr 2013 00:38 problem, complete

I've trying to get parent entries from a Playa field. My code is:

{exp:low_variables:single var="lv_goals"
preparse:entry_ids="{pubs_issues:child_ids}"}

However, it bombs out when it gets to where I output {entry_ids} in the LV. Passing a static value, or even {entry_id} is fine. I've tried early parsing for {lv_goals} Is it possible to do what I'm trying to do here?

LV version 2.3.1, Playa version 4.1.0.3

Replies

  1. Low 22 Apr 2013 06:51

    Having early parsing on or off for the Tag syntax makes no difference.

    Is the lv_goals var a Textarea var?

    It's probably a parse order thing; {pubs_issues:child_ids} isn't parsed to its value when the Single tag is executed.

    Turn on template debugging and look up the actual tag that is processed in there. What does that say?

  2. Sarah Tan 24 Apr 2013 08:54

     
    (0.086934 / 17.77MB) Parsing Tags in Template
    (0.086965 / 17.77MB) Tag: {exp:playa:children entry_id="93" field_id="54" tagdata_cache_index="0"}
    (0.087023 / 17.78MB) No Closing Tag
    (0.087118 / 17.78MB) Tag: {exp:low_variables:single var="lv_goals_from_issues" preparse:entry_ids="{exp:playa:child_ids entry_id="93" field_id="56" tagdata_cache_index="2"}"}
    (0.087171 / 17.78MB) No Closing Tag
    (0.087212 / 17.79MB) Tag: {exp:playa:child_ids entry_id="93" field_id="56" tagdata_cache_index="2"}
    (0.087253 / 17.79MB) No Closing Tag
    (0.087293 / 17.79MB) Tag: {exp:playa:children entry_id="93" field_id="56" backspace="2" tagdata_cache_index="1"}
    (0.087337 / 17.79MB) No Closing Tag
    (0.087369 / 17.80MB) Processing Tags


    Guess it is the parse order then? Can you think of a workaround?

    This is in the LV (textarea):
     
    {exp:channel:entries
    channel="issues"
    disable="categories|member_data|pagination"
    entry_id="{entry_ids}"
    status="open"
    dynamic="no"
    }
    {exp:playa:parents field="goals_issues"}
    <li><a href="{title_permalink=issues/entry}">{title}</a> </li>
    {/exp:playa:parents}
    {/exp:channel:entries}

  3. Low 24 Apr 2013 09:00

    Yeah, see this in the log:

    {exp:low_variables:single var="lv_goals_from_issues" preparse:entry_ids="{exp:playa:child_ids entry_id="93" field_id="56" tagdata_cache_index="2"}"}


    That's where it goes bork. It's a tag inside another tag's parameter, both using double quotes. You might be able to work around it with this:

    {exp:low_variables:single var="lv_goals"  
    preparse:entry_ids='{pubs_issues:child_ids}' parse="inward"}


    Note the single quotes for the preparse parameter. The parse="inward" param might execute the tag inside the parameter.

  4. Sarah Tan 24 Apr 2013 09:03

    Amazing! That combo did it. Thanks so much, Low!