I just got a idea from this thread:
http://forum.umbraco.org/yaf_postst4775_Alternative-Templates--Advice-Needed.aspxThe thing is that a template can only have _one_ master template, so if you want to make use of the same template with different masters, you would have to duplicate your template, which would again force you to maintain two sets of identical templates.
Mu suggestion is actually pretty simple.
You still create templates in exactly the same way that we are used to, but we introduce a meta layer on top of it.
So if I have these templates:
-xhtmlMaster
-printMaster
-LeftMenu
-textPage
A normal page would typically be rendered with textPage -> LeftMenu -> xhtmlMaster. And if I wanted to use my printMaster, then I would need to duplicate my LeftMenu and textPage templates.
If we introduce a "Template Path" then I could define a set of templates that should be linked together like this:
MyNormalPath: textPage -> LeftMenu -> xhtmlMaster (this is not necessary since it is the default path)
MyPrintPath: textPage -> printMaster
It could then be applied with the exact same syntax as the altTemplate.
So /page.aspx?altTemplate=MyPrintPath or /page/MyPrintPath.aspx would check if there is at template OR a template path with that alias, and then apply that set of templates.
What do you think? Would this be cool for at future version of Umbraco?
Morten Bock - Level 2 certified -
My danish blog with a few
english posts |
CodeGarden on Facebook