ricardo.fiel
-
2/9/2010 6:48:04 AM
Choose template according to URL
Hi all,
How can I choose a template for a given doc. type based on the current url? Here's an example:
Assuming I have the following doctypes: - NewsItem - NewsFolder (has NewsItems as children) - Platform (Eg: PS3, Wii, XBOX,... - has NewsFolder as child) - Game (Eg: Halo, Sonic, etc.. - has NewsFolder as child)
As a NewsFolder can be under Platform or Game, I need to show a different template for each parent doctype. Choosing the template in CMSDesk is not an option, as a NewsItem under Game/NewsFolder can be moved to Platform/NewsFolder.
Wildcard URLs seemed to be an option, but they are defined in CMSDesk, which, for the reason above, don't seem to be the best approach.
Any suggestions?
Thanks.
|