0

I have taxonomy terms from A-Z and each article can belong to multiple terms.

for an example, when I create a new article, I have a multi select list for terms. Therefore a particular node should work for multiple URLs.

example.com/categories/a/planning
example.com/categories/g/planning
example.com/categories/s/planning

Please let me know if this can be achieved using a contributed module or can it be built with a custom module?

2
  • It's a very easy task to create aliases. Do you need to create aliases during node save? Do they already exist? How does a user get to each alias? Should the URL be built for the user via form (or some other dynamic method)?? Commented Apr 23, 2019 at 17:09
  • Hi, I know the process of creating aliases. My problem is when a node is assigned to 2 or more categories, the URL becomes example.com/categories/a-g/planning instead creating 2 alises, one for example.com/categories/a/planning and another for example.com/categories/g/planning Commented May 3, 2019 at 6:53

1 Answer 1

1

You can use pathauto module. After installing the pathauto module, please configure the path of article content type from here admin/config/search/path/patterns.

Note: To use pattern require token module.
Then use like following pattern:

categories/[node:field-token-of-term-reference-field]/[node:title]
1
  • I have used pathauto and tokens within the site. However, as I mentioned earlier my problem is when a node belongs to 2 or more categories. Then the alias becomes example.com/categories/a-g/planning instead of creating multiple aliases such as one for example.com/categories/a/planning and one for example.com/categories/g./planning Commented May 3, 2019 at 6:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.