0

OK revamped question: now it displays all the right stuff but it doesn't interact with the tabs and stacks them all in a static display. straight forward EE code works fine. Once i insert the prefix to get the last breakdown locations names however it does not

http://niwot.colorado.edu/index.php/location (straight forward EE code) (PS if you click on the pills some don't have placeholder text)

http://niwot.colorado.edu/index.php/location/test_location2 (with the prefix code but it repeats and doesn't interact with tabs. some how things are not set correctly. tried quite few variations with no success any suggestions?)

{exp:playa:children field="3rd_order_under" limit="25" sort="asc" var_prefix="thirdorder"}
             <li {if count == '1'}class="active"{/if} id="pillTab{url_title}Tab">
               <div class="row">                                     
                 <div class="twelve columns"> 
                   {thirdorder:summary_3rd_order}<br />

                   {thirdorder:exp:playa:children field="4th_order_under_3rd_order" sort="asc" var_prefix="fourthorder"}
                     {fourthorder:title}
                   {/thirdorder:exp:playa:children}

                 </div>
               </div>
             </li>
           {/exp:playa:children}

note: please see playa doc on children for reference

4
  • I think the prefix is only for variables and tags, not loops. I might be wrong though
    – magicspon
    May 8 '14 at 18:46
  • If summary_3rd_order is through the outer playa loop, it should be prefixed as well: {thirdorder:summary_3rd_order} May 8 '14 at 19:38
  • From your example page it's tough to tell what's not working. From what I can see you're getting output from the {fourth order:title} tag (i.e.: Navajo, Navajo bench, Navajo meadow). Can you update the question with what's expected vs what you're getting? May 8 '14 at 19:46
  • @Romans-8---31-39 Its the right words but.. when it renders it loops at the first <li> tag jumps straight to {third order:exp:playa:children… and misses {summary_3rd_order} in-between and creating extra tab boxes (generating a whole bunch div's and li's that shouldn't be there). It should give a summary and the a list of names that fall playa list entries under it's parent name.
    – Eric
    May 8 '14 at 20:06
1

To try and get a handle on what's going on, I would break things down to just the variable output and forget about the html markup until it makes sense. Try this and see if you can pinpoint it:

{exp:playa:children
    field="3rd_order_under" 
    sort="asc" 
    var_prefix="thirdorder"
}
    3rd count: {thirdorder:count} of {thirdorder:total_results}<br>
    3rd url_title: {thirdorder:url_title}<br>
    3rd summary_3rd_order: {thirdorder:summary_3rd_order}<br>

    {thirdorder:exp:playa:children 
        field="4th_order_under_3rd_order" 
        sort="asc" 
        var_prefix="fourthorder"
    }
        4th count: {fourthorder:count} of {fourthorder:total_results}<br>
        4th title: {fourthorder:title}<br>
        <hr>
    {/thirdorder:exp:playa:children}

    <hr>
{/exp:playa:children}  
1
  • 1
    @Jeremy, Romans Thanks for all the input thus far! I am getting it to display the right stuff I just can't get it to interact with tabs correctly. Without the prefix code it works fine and I have provided links to two pages one with straight ahead EE code with out 4th_order_under_3rd_order. I also reworked the original question with code of where I am at now. Any further assistance is greatly appreciated!
    – Eric
    May 9 '14 at 18:32
1

The inner exp:playa:children tag should not be prefixed. The var_prefix is for the variables inside the tag, not for other tags.

You'll want to do something like this:

{exp:playa:children
    field="3rd_order_under" 
    sort="asc" 
    var_prefix="thirdorder"
}
    3rd count: {thirdorder:count} of {thirdorder:total_results}<br>
    3rd url_title: {thirdorder:url_title}<br>
    3rd summary_3rd_order: {thirdorder:summary_3rd_order}<br>

    {exp:playa:children 
        field="4th_order_under_3rd_order" 
        sort="asc" 
        var_prefix="fourthorder"
        entry_id="{thirdorder:entry_id}"
    }
        4th count: {fourthorder:count} of {fourthorder:total_results}<br>
        4th title: {fourthorder:title}<br>
        <hr>
    {/exp:playa:children}

    <hr>
{/exp:playa:children}  
1

Here was the final solution.

     {exp:playa:children field="3rd_order_under" sort="asc" var_prefix="thirdorder"}
     <li {if '{thirdorder:count}' == '1'}class="active"{/if} id="pillTab{thirdorder:url_title}Tab">
       <div class="row">                                     
         <div class="twelve columns"> 
           {thirdorder:summary_3rd_order}<br />

           {thirdorder:exp:playa:children field="4th_order_under_3rd_order" sort="asc" var_prefix="fourthorder" backspace="2"}
             {fourthorder:title}, {/thirdorder:exp:playa:children}

         </div>
       </div>
     </li>
    {/exp:playa:children}  

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.