1

I have content that is tagged with multiple terms from the same vocabulary. How can I use only the first term the node was tagged with, in the URL structure, e.g. domain.com/first/term/with/depth/node-title?

I am trying to do this with the Pathauto module and Drupal 8, but I can't figure it out. It either grabs all the terms used in that node or none.

1

I gave this a try and the following pattern seems to be working:

[node:field_tags:0:entity]/[node:title]

  • Thank you for the reply. That a step in the right direction. – Progonat Nov 7 '17 at 13:56
0

This is what worked. It includes all parents and term of the first entry. If you are using unlimited terms in node, the rest will be ignored.

/[node:field_term:0:entity:parents:join-path]/[node:field_term:0:entity]/[node:title]

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.