How to get the Template ID of the Rendered Alternate Template
I'm trying to use the Alternate template method but am unable to get the id of the template that is being rendered. I have a product and it has relations to recipes.
I have a template with the alias "Related-Recipes" which can be thrown onto the end of the product url to display the related recipes. For example:
Product Information /products/product-info.aspx
Product Related List /products/product-info/related-recipes.aspx (simply uses the same info as Product Information but using the Related Recipes template)
However I am trying to identify the template that is being used to adjust the breadcrumbs accordingly to allow the user to navigate back one step. Ideally I would like to avoid using query strings.
How to get the Template ID of the Rendered Alternate Template
I'm trying to use the Alternate template method but am unable to get the id of the template that is being rendered. I have a product and it has relations to recipes.
I have a template with the alias "Related-Recipes" which can be thrown onto the end of the product url to display the related recipes. For example:
Product Information
/products/product-info.aspx
Product Related List
/products/product-info/related-recipes.aspx (simply uses the same info as Product Information but using the Related Recipes template)
However I am trying to identify the template that is being used to adjust the breadcrumbs accordingly to allow the user to navigate back one step. Ideally I would like to avoid using query strings.
I tried using the solution from the following link but this only give the current nodes template id/alias but not the rendered template id/alias:
http://our.umbraco.org/forum/developers/xslt/1764-testing-against-active-template-name-%5Bsolved%5D
Has anyone dealt with this scenario before or can give a possible solution?
Have you tried something like this:
Thats getting the current nodes set template - not the alternate template that has been added to the end of the url
This will get what you need
Awesome - it returned the alternate template alias name - perfect for checking in the xslt
Thanks Murray ;)
is working on a reply...