Developer forum

Forum » Rapido » XSLT navigation - "template tags"

XSLT navigation - "template tags"

Mikkel Hornbech Nielsen

Hi there.

I was wondering if its possible to display "TemplateTags()" - same purpose, different syntax. In xslt templates.
Pr instance in the template "Navigation/BaseMenuWithDropdown.xslt".

Its because i want to get a custom propertys value (set on the ContentPage item).
So far i am able to pass in system values from the ContentPage item, but i am pretty unsure about how to get the custom value.

Code so far:

               <xsl:apply-templates select="Page">

                    <xsl:with-param name="depth" select="1"/>

                    <xsl:with-param name="menutest" select="@MenuText"></xsl:with-param>

                    <xsl:with-param name="menutesthest" select="@RenderPageInNavigation"></xsl:with-param>




    <xsl:template match="//Page">

        <xsl:param name="depth"/>

        <xsl:param name="menutest" />

        <xsl:param name="menutesthest" />


      <xsl:if test="@RelativeLevel=/NavigationTree/Settings/LayoutNavigationSettings/@startLevel">

            <xsl:apply-templates select="Page">

                <xsl:with-param name="depth" select="$depth+1"/>

                <xsl:with-param name="menutest" select='@MenuText'/>

                <xsl:with-param name="menutesthest" select='@RenderPageInNavigation'/>




The "RenderPageInNavigation" is my custom property on the item.



So is there a way to get that value pasted out in the xslt template?

Something like this pr instance:
”<xsl:value-of select="/"></xsl:value-of>"


Nicolai Pedersen

Hi Mikkel

You can add ?SaveXml=True to your url and then the xml document will get written next to your xslt file. Then you can open it and see how it looks.

I want to make sure you know viewmodel based navigations:

They run in Razor and you have full api access - and it performs faster.

BR Nicolai


You must be logged in to post in the forum