0

I'm try to output an Entry URL like this, which includes the Category URL Titles:

/products/category/sub-category/sub-sub-category/entry-url-title

But I can't work out how to achieve this. Any ideas anyone?

EDIT

This is the code I have so far, but I don't know how to inject the category URLs into the link:

{exp:channel:entries channel="products"}
    <a href="/products/*** category urls to go here ***/{url_title}">{title}</a>
{/exp:channel:entries}
1
  • You're going to need to post some of your template code to be able to get a useful answer. – Tyssen Oct 18 '17 at 8:14
0

What version of EE are you using? In EE2 there is nothing native out of the box that does this. But this will help you do it:

http://gwcode.com/add-ons/gwcode-categories/

Using GWCode Categories your template code should look something like this:

{exp:channel:entries channel="products"}

<a href="/products
   {exp:gwcode_categories channel="{channel_short_name}"
                          entry_id="{entry_id}"
                          max_depth="3"
                          style="linear"
   }
   /{cat_url_title}
   {/exp:gwcode_categories}

/{url_title}">{title}</a>

{/exp:channel:entries}
1

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.