How to get image src from an Image field
September 2, 2009 Leave a comment
I was wondering how to get at src atribute of an Image field in Sitecore,.. her’s an exsample of what data you can find in the Image field..
<image showineditor=”1″ mediaid=”{6WB581DF-395F-400B-A8F2-98690D18AD10}” mediapath=”/Images/yourImage” src=”~/media/Images/yourImage.ashx” />
so if you do a xsl value-of you’ll get this in stead of the image src,.. and that is just not what i wanted ,.. so to solve this you can do folowing
<xsl:value-of select=”sc:fld(‘imageFieldName’, . , ‘src’ )”/>
and thats it (c: