Copied to clipboard

Flag this post as spam?

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


  • Anders Schmidt 76 posts 207 karma points
    Oct 09, 2012 @ 23:02
    Anders Schmidt
    0

    Create gallery from subpages

    I am new in Umbraco and stuck in some xslt. (using umbraco 4.8)

    My content:

    Gallery

    -Photo (containing mediapicker - display crop of image)

    -Photo (containing mediapicker - display crop of image)

    and so on.

    ----------------------------------------------------

      From another page i am able to display singel image form media libary but not with for-each  

      <img>
            <xsl:attribute name="src">
              <xsl:value-of select="umbraco.library:GetMedia($currentPage/sliderImagerPickerNo1, 'false')/imageCropper//crop [@name = 'Slider-Home']/@url" />
            </xsl:attribute>
      </img>

     

    I am using: List subpages for current page.

    Thanks in advance.


  • Claushingebjerg 939 posts 2574 karma points
    Oct 18, 2012 @ 09:20
    Claushingebjerg
    0

    If youre looking to place the macro on the "Gallery" page, listing the subpages, it would be something like this

    <xsl:for-each select="$currentPage/* [@isDoc and string(umbracoNaviHide) != '1']">
      <img>
            <xsl:attribute name="src">
              <xsl:value-of select="umbraco.library:GetMedia(sliderImagerPickerNo1, 'false')/imageCropper//crop [@name = 'Slider-Home']/@url" />
            </xsl:attribute>
      </img>
    </xsl:for-each>

    Remember, when your inside a for-each, you must exclude "$currentPage" in "Getmedia", because you're in a loop of the pages below $currentPage

Please Sign in or register to post replies

Write your reply to:

Draft