Sorted my previous issue but I now have a 'nice to have' issue that I could do with some help with fixing.
I have an XSLT file that currently utlises an uploaded image called 'featuredImage' but I would like to amend this to be a file from the Media instead. Alas my poor knowledge of all things XSLT is letting me down once more and I wonder if any of you kind guys would help me and point me in the right direction.
Use Media n XSLT instead of upload
Hi again guys,
Sorted my previous issue but I now have a 'nice to have' issue that I could do with some help with fixing.
I have an XSLT file that currently utlises an uploaded image called 'featuredImage' but I would like to amend this to be a file from the Media instead. Alas my poor knowledge of all things XSLT is letting me down once more and I wonder if any of you kind guys would help me and point me in the right direction.
here is the code, thanks guys
<?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" xmlns:tagsLib="urn:tagsLib" xmlns:BlogLibrary="urn:BlogLibrary"
exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets tagsLib BlogLibrary ">
<xsl:output method="xml" omit-xml-declaration="yes"/>
<xsl:param name="currentPage"/>
<xsl:template match="/">
<!-- start writing XSLT -->
<xsl:variable name="sliderNode" select="$currentPage/AvailableList/availablesubgroup/PropertyDetails "/>
<div id="slider">
<div id="imageSlider">
<xsl:for-each select="$sliderNode">
<a href="{umbraco.library:NiceUrl(@id)}"><div class="imageSlide">
<div class="imageSliderInfo">
<h2> <xsl:value-of select="@nodeName"/></h2>
<p><xsl:value-of select="numberOfBedrooms"/> bedrooms <xsl:value-of select="costOfProperty"/></p>
</div>
<div class="imageSliderImage">
<img src="{featuredImage}" width="666" height="420" />
</div>
</div></a>
</xsl:for-each>
</div>
</div>
</xsl:template>
</xsl:stylesheet>
http://our.umbraco.org/wiki/reference/umbracolibrary/getmedia
Rich
Formatting broke, this one:
Still broke (there should be spaces after 'variable') darn editor! Hopefully you get the idea.
Rich
Rich, you are a gent and a scholar... thanks very much!
and yep, certainly got the idea
Bri
is working on a reply...