2

In my url the entry have a category and a sub-category.

  1. Category = meat
  2. sub category = beef

href="{url}/{channel_short_name}/{categories}{category_url_title}{/categories}/{url_title}"

I'm using {category_url_title}, but the result URL is:

mysite/recipes/meatbeef/hamburger

The category and the sub category are together: meatbeef with no /. It should be meat/beef.

How to have a category and subcategories working fine, like : cat/subcat/subsubcat..?? It give me headaches :)

Happy XMas Stéphane

3

Use the backspace parameter:

href="{url}/{channel_short_name}/{categories backspace='1'}{category_url_title}/{/categories}/{url_title}"

Backspace removes x characters from the final output.

Watch out if your entry belongs to 1 or more sub categories as your category URLs will grow uncontrollably.

1
  • Thanks a lot for your help!! I tried to put a /, the categories was divided by a /, but // in the front. I didn't know the backspace parameter. – Stéphane Dec 22 '13 at 12:37

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.