3

I have a page where I am displaying all the information from a channel entry along with some information from the playa parent field. But I have not been able to get to display the categories associated with the parent. Is it possible to do this? My code is here below

{exp:playa:parents channel="book" disable=""} {title}

{short_description}

{categories show_group="9"} {category_name} {/categories} MORE DETAILS {/exp:playa:parents}

I had a similar problem with exp:playa:children before and I sorted that by adding the disable="members" parameter. Anyone know how I can get this to work?

2

Assuming your playa tags are within the channel entries tag, try adding var_prefix to separate the playa results from the channel entries results. It might be that the categories tag pair as you have it set up is applying to your channel entries results.

{exp:playa:parents 
    channel="book" 
    disable=""
    var_prefix="pl"
} 
    {pl:title}
    {pl:short_description}

    {pl:categories show_group="9"}
        {pl:category_name}
    {/pl:categories}

    MORE DETAILS 
{/exp:playa:parents}
  • I'm having the same problem as Sucharitha and gave this a shot and it didn't make any difference...any other ideas? – Mike Lohrman Jul 1 '13 at 16:15
  • I tested before posting so it might be another issue. Maybe a new post with your template code? – Romans-8---31-39 Jul 1 '13 at 18:05
  • 1
    Romans-8---31-39, Just went and checked out the docs again and found this note...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. – Mike Lohrman Jul 1 '13 at 18:13
  • woops, hit Enter too soon...after reading that, I set the disabled parameter without categories in it and it worked. Thank you! My guess it will work for Sucharitha as well. – Mike Lohrman Jul 1 '13 at 18:14

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.