2

I am developing a product catalog by means of taxonomy, and want to use URL aliases to better reflect the hierarchy. For example, I have a taxonomy product in the following branch:

category/subcategory/product

The thing I'm sort of surprised is that I have to paste the complete URL path instead of having it automatically glued up out of the aliases of the parent branches, ie. category + subcategory + product

Is there anything I'm doing/understanding wrong? Is that what you guys been through and accepted "as is"?

Artur

1
3

You will want to use the pathauto module. This will also required for you to install the token module.

Once you have those two modules install you will want to head over to the pathauto settings path at admin/build/path/pathauto. You will see there's a field-set for Taxonomy. There is also replacements patterns which contains various different tokens you can use to generate your path.

In your case the pattern you want to use looks like this:

category/[catpath-raw]

This will automatically generate the path for those taxonomy terms based of these categories.

I assume most of this is for 6.x but the same concept applies for 7.x

2
  • 1
    Oh, I see. Something lead me to believe that the pathauto is only for 6.x - that it's about the common URL aliases which is already a built-in functionality of 7.x, and installing pathauto into 7.x does not make any sense. You cleared my mind a bit ;-) Thanks a bunch!
    – Artur
    Jun 21 '11 at 13:09
  • For D7 you may try [term:vocabulary]/[term:parents:join-path]/[term:name]
    – kenorb
    Jul 1 '14 at 11:55

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.