Getting different panel-pages on different level of taxonomy

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
Summitnl's picture

Hi,
I have a website which is a lot optimized for SEO. What I really would like now, is the possibility to have different templates on different taxonomy depth level.

I have taxonomy_menu working with url_aliassing which is the first step.
I talked to Thomas (http://drupal.org/user/8094) and he advised me to ask in this group!

For my solution I am in the need to extract the terms out of the taxonomy_menu url and show a different panel-page related to the depth of the taxonomy-term.

As you can see I have now the following levels:
Frankijk (France) is url: http://www.wintersport-accommodaties.nl/taxonomy_menu/4/14 (4 = vocabulary)
--Les-Trois-Valleés (5) http://www.wintersport-accommodaties.nl/taxonomy_menu/4/14/45

I would like to show a different panel-page related to the taxonomy-term level.
So "country" panel-page for Frankrijk and "region" panel-page for "Les-Trois-Vallees".

So questions are:
1) How can I get the most right piece of the url out of the url? So 14 for France and 45 for Les Trois Vallees?
I need the terms to work with.
2) How can I show different panels related to the amound of variables behind the "taxonomy_menu" string?
So 4/14 means top level term, 4/14/45 means child level term because of three arguments behind the taxonomy_menu string.
The piece of codes is in settings.php, arg() is not working on this place I think..

I will post back the snippet I build with the answeres on these questions.

Thanks a lot in advance for your remarks!

greetings,
Martijn

Comments

I think I got the

Summitnl's picture

EDIT: Yes! I got it working.
Look at www.wintersport-accommodaties.nl and see the Regionaal menu on the left.
Country level: http://www.wintersport-accommodaties.nl/land-info/Frankrijk
Region level: http://www.wintersport-accommodaties.nl/gebied-info/Paradiski
Village level: http://www.wintersport-accommodaties.nl/dorp-info/Les+Arcs
All automated! land-info, gebied-info and dorp-info are panel-pages.

Will build a page with how I did it if enough people want this.
Please make a link to my website www.wintersport-accommodaties.nl if you appreciate this, thanks!

greetings,
Martijn

akshatap's picture

Hi I saw your website and I would like to do the same. I want to extract the taxonomy terms from the taxonomy menu and pass them as arguments to the panel page. Can you tell me how you accomplished this?

Thanks,
Akshata

Search Engine Optimization (SEO)

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week