0

so I am trying to call a Playa (m_p_discipline) inside a Matrix (discipline_3rd_order) inside Playa (thirdorder) inside of channel:entry. I am using var=prefix to get this far. The results of my code is it lists all available playa list entries not just the ones I am trying to get. I must be close but something is off.

Thanks for looking hope you can help!

        <li>
            {thirdorder:discipline_3rd_order}
                {thirdorder:exp:playa:children field="m_p_discipline" var_prefix="matrix_disipline"}
                   {matrix_disipline:title}
                {/thirdorder:exp:playa:children}
            {/thirdorder:discipline_3rd_order}
        </li>
0

The answer according to Brandon at Pixal tonic:

You don't actually need to use {exp:playa:children} if you already have an entry or Matrix row, and you want to just loop through the Playa field's related entries. In that case you can just reference your actual Playa field's short name.

Also, Matrix supports the var_prefix= parameter as well, which is helpful when looping through Playa-within-Matrix-within-Playa.

{3rd_order_under var_prefix="thirdorder_playa"}
        {thirdorder_playa:discipline_3rd_order var_prefix="discipline_matrix"}
            {discipline_matrix:m_p_discipline var_prefix="mx_disipline_playa"}
                {mx_disipline_playa:title}         
            {/discipline_matrix:m_p_discipline}        
        {/thirdorder_playa:discipline_3rd_order}
{/3rd_order_under}

Make sense?

-Brandon

| improve this answer | |

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.