I don't know the umbraco.library extension called getHome,
and actually I don't think that there's anyone called this unless you
developed it yourself (if the extension actually exists, I'd like to
know :) ). What should the extension do?
If you are just trying to create a link to your homepage you can do this:
Error on saving XSLT file : Expression must evaluate to a node-set.
Hello,
I'm facing a problem when I want to save an xslt file in the back office.
I have this error
System.Xml.Xsl.XslTransformException: Expression must evaluate to a node-set.
at System.Xml.Xsl.Runtime.XsltConvert.EnsureNodeSet(IList`1 listItems)
The XSLT file is :
<xsl:variable name="rootNode" select="umbraco.library:getHome($currentPage/ancestor-or-self::node [@nodeTypeAlias = 'Home'])"/>
<li class="toggleSubMenu">
<a id="{$rootNode/@id}" class="top_menu" href="{umbraco.library:NiceUrl($rootNode/@id)}">
Accueil
</a>
</li>
On my developpement PC I can save this file BUT not on my testing environnement ...
Can anyone help me?
Thank you.
Hi Jerome
I don't know the umbraco.library extension called getHome, and actually I don't think that there's anyone called this unless you developed it yourself (if the extension actually exists, I'd like to know :) ). What should the extension do?
If you are just trying to create a link to your homepage you can do this:
<li class="toggleSubMenu">
<a class="top_menu" href="/">
Accueil
</a>
</li>
But if you want to grab the homepage with a document type of "Home", you can do like this in the legacy XML schema:
<xsl:variable name="rootNode" select="$currentPage/ancestor-or-self::node [@nodeTypeAlias = 'Home']"/>
and like this in the new XML schema:
<xsl:variable name="rootNode" select="$currentPage/ancestor-or-self::Home"/>
I hope this helps you out.
/Kim Andersen
Thank you for your help.
GetHome is a customised function and there was an error for the name @nodeTypeAlias = 'Home'.
Now its working with the riht name
is working on a reply...