I've searched the forums high and low and can't seem to find the answer I'm looking for, so if anyone can help it would be much appreciated. :)
Background: What I currently have is a multi level site. I have included a picture of the site structure in case I get mixed up with any of my node levels. I also have NO experience of XSLT at all.
I have a menu at the top which shows level 2 nodes (About, Research, Learning & Teaching etc.). This menu is static as I may not want to show everything at level 2 and thought it best to plan ahead.
Down the left hand side I want a second navigation so that If I browse to the About section, I get a menu with all the level 3 nodes. This I can achieve, but the problem I have is that the site goes a level deeper than this and I want it so that when you click on say Company Structure, it expands to show the child nodes under that one (level 4).
To illustrate the above example:
+Contact Us +History +News and Media +Governance +Company Structure -Subsidiary Companies -General Information
<xsl:variable name="startingLevel"> <!-- what level in the content tree is the "top" of the navigation list generated? --> <xsl:choose> <xsl:when test="string(/macro/startingLevel) != ''"> <xsl:value-of select="/macro/startingLevel"/> </xsl:when> <xsl:otherwise>2</xsl:otherwise> </xsl:choose> </xsl:variable>
<xsl:variable name="stoppingLevel"> <!-- what level in the content tree is the lowest you want to display? --> <xsl:choose> <xsl:when test="string(/macro/stoppingLevel) != ''"> <xsl:value-of select="/macro/stoppingLevel"/> </xsl:when> <xsl:otherwise>4</xsl:otherwise> </xsl:choose> </xsl:variable>
<xsl:variable name="showHome"> <!-- show a "Home" link for the top-level node? --> <xsl:choose> <xsl:when test="string(/macro/showHome) != ''"> <xsl:value-of select="/macro/showHome"/> </xsl:when> <xsl:otherwise>0</xsl:otherwise> </xsl:choose> </xsl:variable>
System.OverflowException: Value was either too large or too small for an Int32.
at System.Convert.ToInt32(Double value)
at System.Double.System.IConvertible.ToInt32(IFormatProvider provider)
at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
at System.Xml.Xsl.Runtime.XmlQueryRuntime.ChangeTypeXsltArgument(XmlQueryType xmlType, Object value, Type destinationType)
at System.Xml.Xsl.Runtime.XmlQueryContext.InvokeXsltLateBoundFunction(String name, String namespaceUri, IList`1[] args)
at (XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, IList`1 parent)
at (XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime)
at Root(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime)
at Execute(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime)
at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument,
XmlResolver dataSources, XsltArgumentList argumentList,
XmlSequenceWriter results)
at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument,
XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter
writer, Boolean closeWriter)
at System.Xml.Xsl.XmlILCommand.Execute(IXPathNavigable
contextDocument, XmlResolver dataSources, XsltArgumentList argumentList,
XmlWriter results)
at System.Xml.Xsl.XmlILCommand.Execute(IXPathNavigable
contextDocument, XmlResolver dataSources, XsltArgumentList argumentList,
TextWriter results)
at System.Xml.Xsl.XslCompiledTransform.Transform(IXPathNavigable input, XsltArgumentList arguments, TextWriter results)
at umbraco.presentation.webservices.codeEditorSave.SaveXslt(String
fileName, String oldName, String fileContents, Boolean ignoreDebugging)
Multi-level menu system
Hi everyone,
I've searched the forums high and low and can't seem to find the answer I'm looking for, so if anyone can help it would be much appreciated. :)
Background:
What I currently have is a multi level site. I have included a picture of the site structure in case I get mixed up with any of my node levels. I also have NO experience of XSLT at all.
I have a menu at the top which shows level 2 nodes (About, Research, Learning & Teaching etc.). This menu is static as I may not want to show everything at level 2 and thought it best to plan ahead.
Down the left hand side I want a second navigation so that If I browse to the About section, I get a menu with all the level 3 nodes. This I can achieve, but the problem I have is that the site goes a level deeper than this and I want it so that when you click on say Company Structure, it expands to show the child nodes under that one (level 4).
To illustrate the above example:
+Contact Us
+History
+News and Media
+Governance
+Company Structure
-Subsidiary Companies
-General Information
I've included XSLT code so far in the next post.
Thanks a lot for help in advance,
Tom
save xlst file >>> Error occured
System.OverflowException: Value was either too large or too small for an Int32.
at System.Convert.ToInt32(Double value)
at System.Double.System.IConvertible.ToInt32(IFormatProvider provider)
at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
at System.Xml.Xsl.Runtime.XmlQueryRuntime.ChangeTypeXsltArgument(XmlQueryType xmlType, Object value, Type destinationType)
at System.Xml.Xsl.Runtime.XmlQueryContext.InvokeXsltLateBoundFunction(String name, String namespaceUri, IList`1[] args)
at (XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, IList`1 parent)
at (XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime)
at Root(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime)
at Execute(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime)
at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlSequenceWriter results)
at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter writer, Boolean closeWriter)
at System.Xml.Xsl.XmlILCommand.Execute(IXPathNavigable contextDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter results)
at System.Xml.Xsl.XmlILCommand.Execute(IXPathNavigable contextDocument, XmlResolver dataSources, XsltArgumentList argumentList, TextWriter results)
at System.Xml.Xsl.XslCompiledTransform.Transform(IXPathNavigable input, XsltArgumentList arguments, TextWriter results)
at umbraco.presentation.webservices.codeEditorSave.SaveXslt(String fileName, String oldName, String fileContents, Boolean ignoreDebugging)
Answer here
http://our.umbraco.org/forum/developers/xslt/3102-Using-niceurl--Value-was-either-too-large-or-too-small-for-an-Int32-
Rich
is working on a reply...