Umbraco/Samples and Articles/Macros

A macro for getting the url of an image
Go to Developer/XSLT Files, create a new xslt file GetImageURL with the following content:

 <!DOCTYPE xsl:Stylesheet [ <!ENTITY nbsp "&#x00A0;"> ]> 



 

      



Now go to Developer/Macros, create a new macro, Get Image URL, giving it the alias GetImageURL. In Use XSLT File, select the XSLT file you just created.

On Parameters, add a new parameter with the alias imageID and name Image ID. The type should be set to mediaCurrent and Show should be checked. Save the macro and your home!