0

I have a channel with a playa entry within that playa I call a matrix and a playa level i need to come back up a level within the matrix/playa loop. Can any one help me with the correct syntax?

Thanks Here is my simplified code.

  {exp:playa:children field="3rd_order_under" var_prefix="thirdorder_playa"}

         <h5>{thirdorder_playa:title}</h5>   

            {thirdorder_playa:discipline_3rd_order var_prefix="discipline_matrix"}
                {discipline_matrix:m_p_discipline var_prefix="mx_disipline_playa"}

                     <!-- example from the discpline channel -->
                     {mx_disipline_playa:discipline_description}

                      <!-- now here where i want to call a different playa within the "thirdorder_playa" -->
                {thirdorder_playa:exp:playa:children field="4th_order_under_3rd_order" sort="asc" var_prefix="fourthorder"}
                       {fourthorder:title} 
               {/thirdorder_playa:exp:playa:children}  </p> 


                {/discipline_matrix:m_p_discipline}
            {/thirdorder_playa:discipline_3rd_order}

  {/exp:playa:children} 
0

The thing about var_prefix is that it not only prevents namespace collisions, it also define the "stage" when it's going to be parsed.

In your case, if you want the Playa loop to happen inside the Matrix, then your best bet would be to use the Matrix field's var_prefix.

I might be wrong - would not be the first time EE's parse order got the best of me in that case.

| improve this answer | |
  • Hi Andris, Replacing "thirdorder_playa" with "discipline_matrix" does not work as "4th_order_under_3rd_order" sits above the matrix inside the "thirdorder_playa". Both "4th_order_under_3rd_order", "discipline_matrix" sit at the same level within "thirdorder_playa" Thanks for looking at my issues!! – Eric Jul 11 '14 at 16:52

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.