<
Neerav Mehta
Founder & CEO
The primary goal of Drupal Pathauto module is to automatically generate aliases for all kinds of content types. These aliases are based on configurable rules that can be set up by you. This module will help you give the URLs on your website a clearer structure and easier readability. A clear URL will also ensure your link gets noticed by search engines.
If you have experience working with Drupal, then you may have already dealt with Pathauto. This article is targeted at newbies who haven’t worked with this module yet.
By default, Drupal's internal links look like these: user/150, node/180 and so on. If you build a site without the Pathauto module, your URLs will look weird and out of place. For example, mywebsite/user/150 or mywebsite/node/180.
In order to get started, you will have to download and install the following modules: Pathauto, Token and Global Redirect.
Go to the admin area. Under modules, search for the Pathauto module recently installed by you. Once you find it, you will have to click on the Configure link on the right as shown below:
Notice the 5 tabs on the right. This is where all the action is.
We will go through each tab to explore them in detail.
1. LIST: Click on this tab to view all aliases used on the page.
The results are there for everybody to see – virgin.com easily ranks among the most breathtaking sites ever!
You can add an alias by clicking on the Add alias link. This takes you to a new page that asks you to provide the current system path and the alias you wish to assign to it. Enter the alias as desired by you.
2. PATTERN: This is where you can set up new patterns for aliases. You can set up patterns for all content types, including articles and basic pages
And if you don't explicitly mention a pattern, it takes the default value provided in the Default path pattern box as shown below.
Why not create a pattern for the article content type?
Let's go ahead and enter a pattern for the Articles. We will go with the most common one used: article/[node:author][node:title]
This is how you go about it:
First, you will have to type in "article/" in the box. Then, click on REPLACEMENT PATTERNS. Expand Nodes as shown below:
Select [node:author] and [node:title]. And voila, your field is ready:
Go ahead and test the new pattern. Create a test article and publish it. The URL generated will correspond to the pattern specified by you above.
3. SETTINGS: This section specifies the conditions according to which the URL aliases are created. Here are the fields on this page:
4. BULK UPDATE: Bulk update creates aliases for entities belonging to specific content types. They work on entities that don’t yet have a Pathauto alias of their own. In most probability, you will have to check the box against Content paths and click Update.
If your goal is to update all existing aliases, you will have to visit the DELETE ALIASES tab first.
5. DELETE ALIASES: This section allows you to delete aliases in bulk. You can check one or more of the following boxes:
Neerav Mehta
Neerav Mehta is the Founder & CEO of Red Crackle. With sterling qualities, Neerav’s technological acumen is firing a generation of progressive companies on the digital path. With an undergraduate degree in Electrical Engineering from India's most prestigious institution IIT Bombay and having spent seven years developing and contributing to the launch of AMD's innovative line of computer products, Neerav founded Red Crackle where he is lauded for his dynamic and innovative genius.
Let’s get you started!