Get values of the current node, load a node by its id
I want to display different menus depending on the document type of the current page. Does anybody know the XSLT for retrieving the @nodeTypeAlias (and other values) for the current page? I know the $currentPage param contains information for all pages, but how do I just select the current page node?
And then I want to load a menu by selecting a top level node by its id, so how do I load a node by its id? eg: if the top level node id I want to use is 1048, then I want to call a menu template in this fashion (bold indicates the part I need help with):
Get values of the current node, load a node by its id
I want to display different menus depending on the document type of the current page. Does anybody know the XSLT for retrieving the @nodeTypeAlias (and other values) for the current page? I know the $currentPage param contains information for all pages, but how do I just select the current page node?
And then I want to load a menu by selecting a top level node by its id, so how do I load a node by its id? eg: if the top level node id I want to use is 1048, then I want to call a menu template in this fashion (bold indicates the part I need help with):
<xsl:call-template name="RenderMenu">
<xsl:with-param name="parent" select="node(1048)"/>
</xsl:call-template>
Thanks
nerdalert,
$currentPage contains info about current node as well, so
does give the document type of the current page being processed.
node(1048) needs to be replaced with
(Also have a look at the wiki pages)
Cheers,
/Dirk
Thanks Dirk, looks like there's loads of useful extensions in the Umbraco.Library
is working on a reply...