Do you want to show the content of a folder because you want to create a gallery? If so you could also have a look at the Digibiz Advanced Media Picker. Have a look at this video: http://www.screenr.com/TEY. It's very easy to create a gallery with it.
show all the media folders as gallery
Hello, what im trying to do is show all my set/folder of images on a single page.
Used the xlst below and the media picker in document type.
Currently i can show only one set/folder of images on my page.
What i really want is show all the set/folders on one single page.
Can i do that? Can anyone give a tip? Many thanks.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp " "> ]>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxml="urn:schemas-microsoft-com:xslt"
xmlns:umbraco.library="urn:umbraco.library" xmlns:Exslt.ExsltCommon="urn:Exslt.ExsltCommon" xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes" xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath" xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions" xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings" xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets"
exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets ">
<xsl:output method="xml" omit-xml-declaration="yes"/>
<xsl:param name="currentPage"/>
<xsl:variable name="mediaFolderId" select="number($currentPage/mediaFolderId)" />
<xsl:variable name="thumbWidth" select="number(67)" />
<xsl:variable name="thumbHeight" select="number(67)" />
<xsl:template match="/">
<!-- Displays all images from a folder in the Media Library -->
<xsl:if test="number($mediaFolderId)">
<ul id="gallery">
<xsl:for-each select="umbraco.library:GetMedia($mediaFolderId, true())/Image">
<xsl:if test="umbracoFile !=''">
<li>
<a href="{umbracoFile}" title="{@nodeName}" rel="gallery">
<img src="/imageGen.ashx?image={umbraco.library:UrlEncode(umbracoFile)}&width={$thumbWidth}&height={$thumbHeight}" width="{$thumbWidth}" height="{$thumbHeight}" alt="{@nodeName}" title="{@nodeName}" class="thumbnail" />
</a>
</li>
</xsl:if>
</xsl:for-each>
</ul>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
Hello,
Do you want to show the content of a folder because you want to create a gallery? If so you could also have a look at the Digibiz Advanced Media Picker. Have a look at this video: http://www.screenr.com/TEY. It's very easy to create a gallery with it.
Jeroen
is working on a reply...