Copied to clipboard

Flag this post as spam?

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

  • David 57 posts 80 karma points
    Jun 13, 2011 @ 17:09

    Images not displaying

    Original thread is marked solved, but still have issues, bringing this to a new post, in hopes it gets viewed. 

    Its easy enough to get around the System.OverflowException with the "ignore errors" checkbox.  However, I cannot get images to show even with the above modifications.   The following change produces no images. 



    If I throw this <xsl:value-of select="$imageFolderContents"/> into the "main_gallery_title" I get the following.



    What am I missing?  I know its something simple that its stupid.  The images are obviously being found, but not displayed. I've tried various things in the for-each to produce the image to no avail.


  • Jan Skovgaard 11264 posts 23592 karma points MVP 9x admin c-trib
    Jun 13, 2011 @ 18:58
    Jan Skovgaard

    Hi David

    Rather than starting a new post then I personally think it's better to "bump" in on the old one, since your question is related to an already existing question.

    But for now I'll reply in here :-)

    Since you're using 4.7 you can't trust the XML structure to be the same, since there was a small bug with that in v 4.5.2, which was the version the original poster had issues with.

    Therefore try creating a <textarea></textarea> where you make a xsl:copy-of, which will return the XML you're trying to match.

    Like this

    <xsl:copy-of select="$ImageFolderContents" />

    I'm guessing you need to write it like $imageFolderContents/Folder/Image...but try to see what you get returned.

    Hope this helps.


  • David 57 posts 80 karma points
    Jun 13, 2011 @ 21:37

    I am not a fan of creating a whole new post either.  Since the other topic had a "solution", it appeared no one was answering or viewing additions.  Your suggestion worked perfectly to find the exact XML output I needed.  I had tried that earlier, but apparently didn't have the right path to produce the output. 

    Greatly appreciated.  

    For those who struggle with this the output I got for the XML

    From this

        <xsl:copy-of select="$imageFolderContents" />


    <Folder ...bunch of attributes>
    <File ...bunch of attributes>
    <umbracoFile>"path to file"</umbracoFile>
    <umbracoBytes>"byte size"</umbracoBytes>

    Hopefully that saves someone the headache I encountered.

  • David 57 posts 80 karma points
    Jun 13, 2011 @ 22:10

    Spoke too soon.  I got the image to display doing the following (notice the commented out textarea per your suggestion)

    Still I only get 1 image to display instead of all 4.  XML output showed all 4. Ideas??

            <ul class="items">
              <xsl:for-each select="$imageFolderContents">
                <xsl:if test="string(current()/File/umbracoFile) != ''">
                      <xsl:attribute name="href">
                        <xsl:value-of select="File/umbracoFile" />
                      <img alt="{current()/@nodeName}">
                        <xsl:attribute name="src">
                          <xsl:value-of select="File/umbracoFile" />
  • David 57 posts 80 karma points
    Jun 13, 2011 @ 22:24

    Alright, how do you mark your own post as a solution. :-)

    Changed the above from

    <xsl:for-each select="$imageFolderContents">


    <xsl:for-each select="$imageFolderContents/File">

    Magically it all works.  Easiest is sometimes the hardest, but I hope this helps someone out.

Please Sign in or register to post replies

Write your reply to: