Master templates with sitemap interrogation

Topics: General, XSLT
Aug 16, 2011 at 6:10 AM

Hi guys,

Apologies if this question has been asked / answered before.

I'm using a relatively old version of C1, with a MasterTemplate function as the master page for the site and I'm trying to display an image based on the URL that the user is browsing.

I understand how the site map function can be used to inject menu-title and page-id into the function for reference, but I'm having no luck.

Follow the steps I took:

MasterTemplate.xsl -> Function Calls -> "inserted" SiteMap

Properties for SiteMap function

Page Source: Default

Page Scope: Constant -> Current Page

My understanding is that I should now be able to access, for example the @MenuTitle within my MasterTemplate, but this is not working?



Aug 16, 2011 at 6:46 AM


Do you see the SiteMapXml function call result  on the Preview tab of your MasterTemplate.xsl ? If the current page has MenuTitle then it can be accessed on the Template tab like this:

 <xsl:value-of select="/in:inputs/in:result[@name='SitemapXml']/Page/@MenuTitle" />