0

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:/].

2 Answers 2

1

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.

1
  • I edited my post about details you asked.
    – trkaplan
    Commented May 26, 2015 at 7:31
0

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.

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.