3

On my site I have a content type 'Article' that has a reference field to a taxonomy vocabulary 'Type of Article' containing terms like 'Blog', 'News', etc.

Now I would like to have Pathauto form a different URL for each type of Article. E.g. /blog/article-title, /news/article-title, etc. Is it possible to set a pathauto pattern depending on the settings of that reference field?

Earlier I used different content types, with which it was no problem to get a different Pathauto pattern for each. But as the fields in the content types were the same I would like to solve it like this.

0
3

Right beneath the pattern input you have a link that opens a popup to let you choose tokens to be put in the pattern. For field values it normally goes along the line of [node:field_foobar:value]. Depending on the field value you may also consider to either provide your own custom token or to alter the current token with an alter hook to replace the value with an URL-safe value (like to prevent the URL contains an Emoji for example).

Drupal URL alias path pattern tokens

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.