I'm trying to create a link to a parent (home / level 0) node in my XSLT file. When trying to save the file, a error appeirs: "System.OverflowException: De value is to large or to small for a Int32.
Thanks for your feedback. Your provided solution is perfect ... I was trying to solve a problem by using XSLT but the solution was simple plain old html...
Well, at least that would work (with the new XML schema) if yout top most node is located on level 1 which is the the most used way to structure a site in Umbraco :)
Link to parent node
Hi,
I'm trying to create a link to a parent (home / level 0) node in my XSLT file. When trying to save the file, a error appeirs: "System.OverflowException: De value is to large or to small for a Int32.
Does anyone what's wrong? Thanx for your help.
<xsl:output method="xml" omit-xml-declaration="yes"/>
<xsl:param name="currentPage"/>
<xsl:variable name="HomeNode" select="$currentPage/parent::node" />
<xsl:template match="/">
<tr>
<td class="TableCellNavLeft">
<a href="{umbraco.library:NiceUrl($HomeNode/@id)}">
Home</a>
</td>
</tr>
</xsl:template>
</xsl:stylesheet>
Try this
Explaination here http://our.umbraco.org/forum/developers/xslt/3102-Using-niceurl-Value-was-either-too-large-or-too-small-for-an-Int32-
Rich
Hi Rich,
Thanks for your feedback. The error is gone. That's super. But I also have no output. For some reason the link is not generated.
Does anyone know why ?
Tim
Are you trying to find the home node or the parent node?
Also which version of Umbraco are you using.
Rich
Hi Rich,
I'm trying to create a link pointing to the home node (level 0), to be used on pages below the home node...
I'm currently using 4.5.2.
Tim
Hi Tim
If you just want to link to your homepage you can just do like this:
/Kim Andersen
Hey Kim,
Thanks for your feedback. Your provided solution is perfect ... I was trying to solve a problem by using XSLT but the solution was simple plain old html...
Thanks Kim
Tim
No problem Tim.
In XSLT, you can grab the top most node in your site with this piece of code:
Well, at least that would work (with the new XML schema) if yout top most node is located on level 1 which is the the most used way to structure a site in Umbraco :)
/Kim Andersen
is working on a reply...