Copied to clipboard

Flag this post as spam?

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


  • lele 107 posts 444 karma points
    Jan 23, 2012 @ 11:51
    lele
    0

    List all images from a media picker folder

    hi all

    i have a doc type with a media picker for to pick up a folder with images. i want to show this images for all pages in a node, but i' ve got this error:

     

    Error parsing the XSLT:

    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) at System.Xml.Xsl.XslCompiledTransform.Transform(IXPathNavigable input, XsltArgumentList arguments, XmlWriter results, XmlResolver documentResolver) at System.Xml.Xsl.XslCompiledTransform.Transform(IXPathNavigable input, XsltArgumentList arguments, TextWriter results) at umbraco.macro.GetXsltTransformResult(XmlDocument macroXML, XslCompiledTransform xslt, Dictionary`2 parameters) at umbraco.presentation.umbraco.developer.Xslt.xsltVisualize.visualizeDo_Click(Object sender, EventArgs e)

     

     

    here is the part of code which fails:

    <xsl:for-each select="umbraco.library:GetMedia($currentPage/galleryImageFolder, true())/Image">
      <xsl:if test="umbracoFile !=''">
          <li>
            <img src="/imageGen.ashx?image={umbraco.library:UrlEncode(umbracoFile)}&amp;height=100&amp;constrain=true" alt="{umbracoFile}" />
          </li>
      </xsl:if>                
    </xsl:for-each>

     

    have some one any idea what i do wrong?

    many thanks!

  • Tom Maton 387 posts 660 karma points
    Jan 24, 2012 @ 10:32
    Tom Maton
    0

    there is a good example in the wiki here.

    http://our.umbraco.org/wiki/how-tos/xslt-useful-tips-and-snippets/list-images-from-mediafolder-in-umbraco-45-plus

    Just need to modify slightly to your needs but covers everything. 

  • Jeroen Breuer 4909 posts 12266 karma points MVP 6x admin c-trib
    Jan 24, 2012 @ 10:37
  • 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