Playa Documentation

{exp:playa:parents}

You can use the {exp:playa:parents} tag pair to loop through entries that relate a given entry(s).

{exp:channel:entries channel="photos"}
    <h3>As Seen in Articles</h3>
    <ul>
    {exp:playa:parents channel="articles"}
        <li><a href="{path={channel_short_name}/{url_title}}">{title}</a></li>
    {/exp:playa:parents}
    </ul>
{/exp:channel:entries}

Tag Parameters


{exp:playa:parents} supports almost all of {exp:channel:entries}’ tag parameters, as well as the following:

  • entry_id The child entry’s ID(s). If your tag is within an {exp:channel:entries} tag pair, this will default to the current entry’s ID.

  • parent_id The parent entry ID(s) to include. Prefix with “not” to define entries to exclude instead.

  • field The Playa field’s name where the relationship was made, or the Matrix field’s name if your Playa field lives within a Matrix field.

  • field_id The Playa field’s ID where the relationship was made, or the Matrix field’s ID if your Playa field lives within a Matrix field.

  • col The Matrix column’s name where the relationship was made.

  • col_id The Matrix column’s ID where the relationship was made.

  • row_id The Matrix row’s ID where the relationship was made.

var_prefix Tells Playa to only parse variables that have a certain prefix. This is handy when you’re dealing with variable name conflicts, such as if you’re pulling in an entry with its own Playa tag.

Note: Playa sets the disable tag parameter to “categories|category_fields|member_data|pagination” by default. So if you want to display categories, member data, or pagination tags in your Playa tag pair, you’ll need to override that parameter.

Variable Tags


{exp:playa:parents} supports almost all of {exp:channel:entries}conditional variables,single variables, and `variable pairs, as well as the following:

{if no_parents}{/if}

Outputs the contents only when there are no parent entries returned.

Support

Having problems setting up and/or using Playa? Support is offered from 10am to 4pm EST weekdays. Send us an email at help@eeharbor.com and we will respond as quickly as we can.