Copied to clipboard

Flag this post as spam?

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


  • anthony hall 217 posts 530 karma points
    May 24, 2009 @ 11:29
    anthony hall
    0

    Render template

    I am having issues with renderTemplate. First let clarify what i'm trying to do.

    I have "/technical/MicrophoneList"

    i want to include the content of this node into the following pages.

    "/studio1/MicrophoneList"
    "/studio2/MicrophoneList"
    "/studio3/MicrophoneList"

    I am using the following XSLT. but am getting errors

    XSLT






    ERRORS

    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)
    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 ignoreDebugg



    Any thoughts, is this right approach.

  • Daniel Lindstrom 454 posts 271 karma points
    May 24, 2009 @ 11:59
    Daniel Lindstrom
    0

    Simply check the checkbox 'Skip testing' and you'll see that it works in the front end.

    A more permanent alternative is to put xsl:if around the renderTemplate stuff:



    When saving, the xslt is validated, but at that time the $pageId and $templateId does not hold any values. RenderTemplate will throw an error if the parameters are empty. The same issue exists with the GetMedia and NiceUrl functions.

    EDIT: 2x Typo: should be '!=', not '='.

  • anthony hall 217 posts 530 karma points
    May 24, 2009 @ 14:23
    anthony hall
    0

    oh yeah, i see.

    Thanks daniel all working :)

  • Daniel Lindstrom 454 posts 271 karma points
    May 24, 2009 @ 22:08
    Daniel Lindstrom
    0

    Glad you got it working! I hope my typo did not cause any difficulties for you. I have edited it now.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies