zoejessica.com

Generating aliases automatically in Drupal

(Part 4 of a series on setting up a corporate website in Drupal. Part 1 Part 2 Part 3)

The way to go must surely be the Pathauto module, which creates path aliases for nodes, users and categories automatically. For my purposes that means automatic handling of urls like mysite.com/product_type/product_subtype/product which would be a huge amount of work to maintain manually.

Pathauto also requires the Token module. After both are installed, you configure exactly how you want your aliases generated using the Site configuration/Pathauto tab. For instance, for my Product nodes, I wanted to include the entire vocabulary tree that the product belongs to, so my pattern was as follows:
products/[termpath-raw]/[title-raw]
Enable the Bulk update checkbox to create the aliases, and review the changes under the Site Building/URL Aliases tab. This is a really simple use of the Pathauto module, but it worked brilliantly for what I needed to do. Next: Themes

2 Responses to “Generating aliases automatically in Drupal”

Leave a comment