Copied to clipboard

Flag this post as spam?

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


  • Xanthos 2 posts 23 karma points
    Oct 26, 2010 @ 23:43
    Xanthos
    0

    Picture with a link to another picture uploted in a same node

    well, I've made two upload controls, one for a thumbnail which is supposed to be shown as a part of a node and another one which should be opened directly in a browser to show image in full size when clicking on a thumbnail (in case someone is interested into saving picture and I don't like the idea to resize original size picture to fit into node).

    I have no idea how to get the path to a uploaded photo, please help :(

     

                      <xsl:for-each select="$currentPage">
                          <a href="location of a current()/photo">
                               <xsl:choose>
                                <xsl:when test="current()/photoThumbnail != ''">
                                    <img src="{current()/photoThumbnail}" alt="{@nodeName}"/>
                                </xsl:when>
                                <xsl:otherwise>
                                 </xsl:otherwise>
                            </xsl:choose>
                         </a>
                    </xsl:for-each>

     

    Thanks in advance.

     

     

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Oct 27, 2010 @ 10:47
    Lee Kelleher
    0

    Hi Xanthos,

    First, just to confirm that you are using the Upload data-type, and not the media-picker data-type?

    What is the property alias for the full-size photo?

    Also, is your XSLT currently displaying the thumbnail images? As you shouldn't need to use a for-each to loop through the $currentPage, as there'd be only 1 iteration.

    Try this instead:

    <xsl:if test="$currentPage/photoThumbnail != ''">
        <a href="{$currentPage/photo}">
            <img src="{$currentPage/photoThumbnail}" alt="{$currentPage/@nodeName}"/>
        </a>
    </xsl:if>

    Cheers, Lee.

  • Xanthos 2 posts 23 karma points
    Oct 27, 2010 @ 11:25
    Xanthos
    1

    Thank You, now it works as it was supposed so (thumbnail images were displayed before and I was using Upload data-type)   :)

Please Sign in or register to post replies

Write your reply to:

Draft