1

I have a matrix field ({home_layout}) with the first cell setup as a Playa select single entry all in the channel home.

How can I now call the channel entry data from that Playa field which is from the channel main?

So far I have:

{exp:channel:entries channel="home"}
{home_layout}
{playa}
{title}
{/playa}
{/home_layout}
{/exp:channel:entries}

...which is returning nothing.

First time i've used Playa and Matrix so appreciate any help.

N

  • Where specifically is data not being output? Inside the playa tag? Inside the matrix tag? Inside the channel entries tag? Try to add some more fields inside of each tag pair just to test what is and isn't working. – Jason Varga May 12 '13 at 17:46
  • I'm with Jason here - have you confirmed your channel entries tags and matrixes are outputting data? ie: adding a {title} after {exp:channel:entries} for one? Let's see if you're getting the initial entries.... – Lisa May 13 '13 at 20:56
1

This is working beautifully now:

{exp:channel:entries channel="home" status="homepage|open"}
{home_layout}

{playa_1}
<h1>{title}</h1>
{/playa_1}

{/home_layout}
| improve this answer | |
0

Try using the Playa children tag instead of the regular Playa field tag, so you can make use of the var_prefix parameter.

{exp:channel:entries channel="home"}
  {home_layout}
    {exp:playa:children field="playa_field" var_prefix="pl"}
      {pl:title}
    {/exp:playa:children}
  {/home_layout}
{/exp:channel:entries}
| improve this answer | |
  • Just tried that. Sadly, it's not returning any entries. – Niall Thompson May 12 '13 at 16:54
  • Have you tried adding dynamic="no" to your {exp:channel:entries} tag? That will generally solve the "tags are right but no data is returned" mystery. – Brooks Seymore May 12 '13 at 17:05
  • Adding dynamic="no" didn't help. Here is what I have at the moment: {exp:channel:entries channel="home" dynamic="no"} {home_layout} {!-- Matrix Field --} {exp:playa:children field="home_layout" var_prefix="pl"} {!-- home_layout is the title of the matrix field, the play field lives within a matrix field --} {pl:title} {/exp:playa:children} {/home_layout} {/exp:channel:entries} – Niall Thompson May 12 '13 at 17:12

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.