how would i retrieve every images under Image folder in Media section
Hi,
I am trying to loop through an Image folder to render out every images under this folder. I am using new schema 4.5.2. A code snipet would be much appriciated
It would be good to better understand how you have set this up.
Is this in a media section? Are you looking to have a media picker that picks the media folder and then list every image in that folder. When you say under that folder will there be sub-folders too?
Yes it is in media section as the title of the topic say. Basicly i am only try to show every images under Image/MyRolloverImages for rollover feeding. There will be no subfolder. i've create Image/MyRolloverImages folder and it has id = 1685.
how would i retrieve every images under Image folder in Media section
Hi,
I am trying to loop through an Image folder to render out every images under this folder. I am using new schema 4.5.2. A code snipet would be much appriciated
Thank you
It would be good to better understand how you have set this up.
Is this in a media section? Are you looking to have a media picker that picks the media folder and then list every image in that folder. When you say under that folder will there be sub-folders too?
Hi Bogice,
I found this page on the Umbraco wiki.
With this code, you should be able to list images from a mediefolder in the media section.
http://our.umbraco.org/wiki/how-tos/xslt-useful-tips-and-snippets/list-images-from-mediafolder-in-umbraco-45-plus
Hope it will helps you to solved your question
/Dennis
Thank you for your fast respond Scott,
Yes it is in media section as the title of the topic say. Basicly i am only try to show every images under Image/MyRolloverImages for rollover feeding. There will be no subfolder. i've create Image/MyRolloverImages folder and it has id = 1685.
Thank you guys, i have figure it out, this is how i did for other's reference
<xsl:output method="xml" omit-xml-declaration="yes"/>
<xsl:param name="currentPage"/>
<xsl:template match="/">
<xsl:variable name="ri" select="umbraco.library:GetMedia(1685, true())" />
<div id ="slider">
<xsl:for-each select="$ri/*">
<xsl:if test="./@id">
<xsl:variable name="m" select="umbraco.library:GetMedia(./@id, false())"></xsl:variable>
<img src="{$m/umbracoFile}" alt="" />
</xsl:if>
</xsl:for-each>
</div>
</xsl:template>
</xsl:stylesheet>
is working on a reply...