<!--<xsl:variable name="mediaFolder" select="/macro/mediaFolder" />--> <xsl:variable name="mediaFolder" select="$currentPage/mediaFolder" /> <xsl:template match="/"> <xsl:if test="$mediaFolder[Folder]"> <xsl:variable name="media" select="umb:GetMedia($mediaFolder/Folder/@id, true())" /> <!-- If no errors, this will run the Folder template below --> <xsl:apply-templates select="$media[not(error)]" /> </xsl:if> </xsl:template> <!-- Template for the folder --> <xsl:template match="Folder"> <!-- Run templates for individual items (just add Media type aliases) --> <xsl:apply-templates select="File | Image" /> </xsl:template> <!-- Template for items - you can create individual templates to render them differently --> <xsl:template match="File | Image"> <a href="{umbracoFile}"><img src="{umbracoFile}" /></a> </xsl:template> </xsl:stylesheet>
I want to get the parameter value from the current document. Where i have this in the document type
The XSLT you have was written for use with a macro parameter called "mediaCurrent" - to make it work with a media picker instead, change the root template to this:
<xsl:template match="/">
<xsl:if test="normalize-space($mediaFolder)"> <xsl:variable name="media" select="umb:GetMedia($mediaFolder, true())" />
<!-- If no errors, this will run the Folder template below -->
<xsl:apply-templates select="$media[not(error)]" />
</xsl:if>
</xsl:template>
Get media with Parameter from page
Hi
Umb ver 4.7.2
MsSql 2008
I am trying to get a list of image to load form a folder with xslt... (One moe time.... )
Here is the code
I want to get the parameter value from the current document. Where i have this in the document type
Tab: Background images
Edit "mediaFolder"
Search for a regular expression
How do i get to select the macro "mediafolder " from the current document.
I have been trying the last days to get to work.. Now i need a a little help
Tanks to all of you in here at our.umbraco.
Hi René,
The XSLT you have was written for use with a macro parameter called "mediaCurrent" - to make it work with a media picker instead, change the root template to this:
Let us know if it works!
/Chriztian
is working on a reply...