2

We're seeing a bit of strange behavior - perhaps our eyes are missing the obvious thing?

This block of code works correctly when used in a template in the main or default site in a MSM configuration. It also partially works on templates in the added-on site (which happens to be a mobile version of the site: m.domain.com). Our problem is that the deepest loop using the playa field menu-section-items is not displaying any of the children.

For clarity:

menu-sections = Matrix Field menu-section-title = Matrix Cell/Column type text menu-section-items = Matrix Cell/Column type Playa

We have attempted this with real values substituted for the segment variables to no avail. Either method works when used in templates in the default site.

CODE:

  {exp:channel:entries site="default_site" channel="menu" url_title="{segment_3}"}

     {menu-sections row_id="{segment_4}"}

        {menu-section-title}    

        {menu-section-items} {if no_children} -flag- {/if}

             <li>
                <span class="menu_item_title">{menu-item-title}</span>
                <span class="menu_item_desc">{menu-item-description}</span>
             </li>

        {/menu-section-items}

     {/menu-sections}

   {/exp:channel:entries}

One strange bit of info we uncovered while testing is that the conditional check for children above immediately after the opening menu-section-items tag renders the -flag- contents ONLY when there ARE actual relationships. If relationships are simply blank this -flag- text will not render. Very odd...

In troubleshooting this problem we have updated our Expression Engine to version 2.7.2 - Build Date: 20131008. (Current) Matrix 2.5.8 (Current) Playa 4.4.5 (Current)

I hope someone can point us in another direction or highlight an error above?

Thanks!

David

3
  • {exp:playa:children site="default_site" field="menu-section-items" status="not closed"} {title} {/exp:playa:children}
    – David
    Oct 14, 2013 at 18:56
  • same result as the first syntax method
    – David
    Oct 14, 2013 at 18:56
  • David, first off - rewrite the template using the var_prefix parameter, so that the template becomes a bit more readable and you eliminate naming conflicts. For an example on how that parameter works, take a look at docs.pixelandtonic.com/playa/templating/module/children.html and do a search for "var_prefix". Let's see where that gets us. Oct 15, 2013 at 5:26

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.