I am using XSLT to render the above and need to set class="active" on the <li> for the page selected.
My problem is that I need to know which alternative template was used when the page loads. I tried using $currentPage/@tempate but that only returns the template associated with the page. I need something like $currentPage/@templateInUse :-)
Is there a way to get the template that is being used from with my XSLT ?
Find the AltTemplate in use
We have a page with a number of tabs used as links. Each link opens an alternate template for that page i.e.
<ul>
<li><a href="ProductX/TemplateA>Order Details</a></li>
<li><a href="ProductX/TemplateB">Order Lines</a></li>
<li><a href="ProductX/TemplateC">Other Details</a></li>
</ul>
I am using XSLT to render the above and need to set class="active" on the <li> for the page selected.
My problem is that I need to know which alternative template was used when the page loads. I tried using $currentPage/@tempate but that only returns the template associated with the page. I need something like $currentPage/@templateInUse :-)
Is there a way to get the template that is being used from with my XSLT ?
Thanks for any help,
Hi RDNZL,
You can find out the name/alias of the template from the "altTemplate" property which is stored in a HttpContext Item:
The only problem is that this doesn't give you the template's ID, just it's name/alias.
If I figure out how to get the ID, I'll let you know.
Cheers, Lee.
Thanks Lee,
That worked a treat :-)
Kind Regards,
RDNZL
We wrote a method that doesn't seem to work in 4.11.8 , I think it worked in earlier versions.
is working on a reply...