How to join several vocabularies

guldoe's picture

I have several vocabularies like cities and services

cities [ london, paris , madrid ]
services [ restaurants, ...]

How to make url automatic like this

http://www.example.com/london/restaurants/xxxxx

Thz

Groups:
Login to post comments

Pathauto API

fgm@drupal.org's picture
fgm@drupal.org - Sun, 2009-03-15 09:08

Since you're mixing and matching terms from several vocabularies, you cant' use the builtin term path in pathauto.

What you can do, however, is use the pathauto API in your site module by implementing hook_token_values and hook_token_list : define your own tokens made of such term strings from several vocabularies, and use them as the replacement token in pathauto for the venue nodes like restaurant xxxx in london.

You'll find more information in pathauto's API.txt.


token API

greggles's picture
greggles - Tue, 2009-03-17 13:19

Thanks for the answer, FGM.

the pathauto API in your site module by implementing hook_token_values and hook_token_list...

You'll find more information in pathauto's API.txt.

It is actually the token API, and more information is in the token API.txt

--
Growing Venture Solutions | Drupal Dashboard | Learn more about Drupal - buy a Drupal Book