F
F
fewdji2014-06-21 15:29:27
Drupal
fewdji, 2014-06-21 15:29:27

How to make a URL like this in Drupal 7: site.ru/category/subcategory/postname.html?

Hello.
I need to implement CNC in Drupal 7, so I installed the following modules: Pathauto, Token and Transliteration.
When I create a new post, I want to automatically receive a URL of the form: site.ru/CategoryName/SubcategoryName/PostName.html, but so far this has not been possible.
There is a dictionary "Categories" (machine name - category). It contains the term "News" (machine name - news), which has a synonym for URL - news. There is also the term "World", which is a subcategory of the term "News", and it has - news/world in the URL Synonyms field.
It turns out that I need to display a machine name or a synonym in the URL. Are there such tokens?
Example:
Category: News (synonymous with /news);
Subcategory:
Need to get: site.ru/news/world/postname.html

Answer the question

In order to leave comments, you need to log in

3 answer(s)
T
Tony Realovich, 2014-06-26
@fewdji

We go to the address: admin/config/search/path/patterns
In the type of material we need, we put the following template:
where field-category is the field in the content type "term reference"

N
Nikita, 2014-06-21
@nikita-b

Well, you can also use wildcards there. Implement categories through taxonomy. And there are a lot of different options out there. For example, add a URL field to each term and pull the name for the CNC from it. Or use the URL of the term (More correct. And so on.

A
Alexander, 2014-07-13
@Aleks-NP

configure the autopach module.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question