ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

category_url_title outputs a string with all parent and child categories

September 20, 2011 7:42pm

Subscribe [2]
  • #1 / Sep 20, 2011 7:42pm

    Chris Arnold

    201 posts

    Maybe a simple categories question but I can’t seem to find a straight forward answer. I have a Playa relationship setup so I can display what essentially are “recommended products” links. I have products in different subcategories.

    <a href="/products/{categories}{category_url_title}{/categories}/{url_title}">

    The above is 95% there, but it’s outputting the as ParentChild (or “chairsmetal-chairs”). I just need the parent to show (“chairs”). Didn’t think parent_only was an option in this situation, but haven’t run across it before.

    What’s the best approach here?

    Moved to Community Help forum by Moderator

  • #2 / Sep 21, 2011 10:32am

    Sue Crocker

    26054 posts

    Hi, Chris. Since this has to do with a third party add-on, I’m going to move this to the Community Help forum for additional community support.

  • #3 / Sep 21, 2011 12:47pm

    Chris Arnold

    201 posts

    Hi Sue. I only mentioned Playa for context. In reality this is an EE parent/child category question when using the tag:

    {category_url_title}

    It outputs as ParentChild (if an entry is in a sub-category) when I only need it to show Parent for linking purposes.

  • #4 / Sep 21, 2011 3:42pm

    Chris Arnold

    201 posts

    Possible to move this back to technical support, Sue?

  • #5 / Sep 23, 2011 12:01pm

    Chris Arnold

    201 posts

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases