I want to categorise my pages and see the category names in path.

For example: instead of http://localhost/a-funny-story, http://localhost/stories/funny/a-funny-story.

What is the best practice? I tried to do it with Pathauto module. I created a content type with a term reference of a category taxonomy.

I use this pattern [node:field_my_page_category]/[node:title] in "CONTENT PATHS". But this doesn't work for multi-level categories. I tried to use "join" [node:field_my_page_categories:parents:join:/]/[node:title] as mentioned here.

But I get this error: The Pattern for all Sayfa paths is using the following invalid tokens: [node:field_my_page_category:parents:join:/].


If it is a node, you need to use Pathauto and also Replacement Patterns, in the Replacement Patterns select the taxonomy term and put it in the url.

enter image description here

But if you need to list set of contents based on the url you need to use Views and add the terms as contextual filters.

|improve this answer|||||
  • I edited my post about details you asked. – trkaplan May 26 '15 at 7:31

Enabling Entity Tokens module and changing the pattern to [node:field_my_page_categories:parents:join:/]/[node:field_my_page_categories:name]/[node:title] solved my problem.

|improve this answer|||||

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.