Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Dane Garcia 9 posts 70 karma points
    Jul 04, 2013 @ 21:41
    Dane Garcia
    0

    Starting Site Map from Level 2

    Hello all, I'm trying to start a sitemap from level 2 and having some issues. I'm just using the standard site map template and chaning the param line for parent

    From:

    <xsl:with-param name="parent" select="$currentPage/ancestor-or-self::* [@isDoc and @level=1]"/>

    To:

    <xsl:with-param name="parent" select="$currentPage/ancestor-or-self::* [@isDoc and @level=2]"/>

    I get the following error:

    Error occured

    System.OverflowException: Value was either too large or too small for an Int32.
    at System.Convert.ToInt32(Double value)
    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 System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter writer)
    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)

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Jul 04, 2013 @ 22:40
    Dennis Aaen
    0

    Hi Dane,

    I have mde some small test on a local installation of Umbraco and I have not been able to find a solution. At the same time, I can see.some others have the same issue as you.http://our.umbraco.org/forum/developers/xslt/16663-Sitemap-from-level-2. I have search the forum to see if I could find some thing that could help to closer to a solution.

    In the post I mention above Dan solve the issue by using the package.Cogworks-flexible-navigation

    http://our.umbraco.org/projects/website-utilities/cogworks-flexible-navigation.

    I havn´t used it myself but you have the opportunity to select a start level and how deep it´s should go listing nodes.

    I hope this could be a solution for your problem.

    /Dennis

     

  • Dane Garcia 9 posts 70 karma points
    Jul 05, 2013 @ 15:41
    Dane Garcia
    100

    I was able to resolve my issue without the Cogworks-flexible-navigation. The solution is as follows:

    Changed:

    <xsl:with-param name="parent" select="$currentPage/ancestor-or-self::* [@isDoc and @level=1]"/>

    To:

    <xsl:with-param name="parent" select="umbraco.library:GetXmlNodeById(1144)"/>

    The 1144 is the node id of the home page I wished to start the site map from. You can obtain the node id of any page/media item by going to the properties tab in the back office, it will be titled "Id". Thanks for your suggestion though Dennis!

Please Sign in or register to post replies

Write your reply to:

Draft