How to use Drupal 7 Pathauto module to automatically create smarter URLs
Why is this useful?
-
Better site navigation for your users
-
Better site organization through breadcrumbs that actually work right!
-
You can use one content type and organize it into sub-categories
-
SEO
Modules needed
Better site organization and SEO
Create new taxonomy
Create a new taxonomy called product categories. Add new term, in my case I created one called poncho. Add a new field type of term reference to your node type and assign it to the taxonomy vocabulary called product categories.
Create new url pattern
Find your Pattern under URL aliases (admin/config/search/path/patterns). In my case I created a node type called product so my pattern was located under Pattern for all Product paths. I added the following tokens [node:field_product_category]/[node:title]. Create or go to an existing content of type Product. Choose your product category, poncho in my case and save node.
If you visit the node you’ll see https://yourawesomewebsite.com/poncho/your-product-title-here
NOTE: Ensure that you have auto assign url turned on before you save your content or Drupal won't be able to auto assign the URL based on the tokens we used.
Leave a comment