Copied to clipboard

Flag this post as spam?

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


  • Gaurav 12 posts 32 karma points
    Jul 19, 2011 @ 07:14
    Gaurav
    0

    How we can show images in Media folder

     

    MainFolder---
             ---Subfolder1--images
             ---Subfolder2--images
             ---Subfolder3--images
             ---Subfolder4--images


    how we can show every subfolder first images 

     

    thanks

    Gaurav

  • Bas Schouten 135 posts 233 karma points
    Jul 19, 2011 @ 11:57
    Bas Schouten
    0

    Hi Gaurav,

    I did something similar. Take a look at this code.

      <xsl:variable name="albumNodes" select="umbraco.library:GetXmlNodeById(1122)/* [@isDoc and self::Album and string(umbracoNaviHide) != '1']" />
      <xsl:for-each select="$albumNodes">
       <div>
        <a href="{umbraco.library:NiceUrl(@id)}">
         <strong>
          <xsl:value-of select="pageTitle"/>
         </strong>
        </a>
        <br />
        <xsl:variable name="MediaNodeId" select="mediaAlbum" />
        <a href="{umbraco.library:NiceUrl(@id)}">
         <xsl:for-each select="umbraco.library:GetMedia($MediaNodeId, true())/* [umbracoFile != '']">
          <xsl:if test="position()='1'">
            <img src="{umbracoFile}" width="198" height="118" border="0" alt="{@nodeName}" />
          </xsl:if>
         </xsl:for-each>
        </a>
       </div>
      </xsl:for-each>
Please Sign in or register to post replies

Write your reply to:

Draft