Skip to content

Instantly share code, notes, and snippets.

@modmedia
Created January 9, 2014 18:55
Show Gist options
  • Save modmedia/8339802 to your computer and use it in GitHub Desktop.
Save modmedia/8339802 to your computer and use it in GitHub Desktop.
Method on displaying Mura extended attribute images, including custom image sizes
<!--- Assuming you've created an extended attribute 'File' type called 'extAttributeImage' --->
<!--- In a Mura Page Template --->
#$.createHREFForImage(filename=$.content('extAttributeImage'),size='myCustomSize')#
<!--- In a Mura Component --->
#$.createHREFForImage(filename=$.component('extAttributeImage'),size='myCustomSize')#
<!--- In the context of an iterator --->
#$.createHREFForImage(filename=item.getExtAttributeImage(),size='myCustomSize')#
@rodionbykov
Copy link

Hello,

you are correct, in Mura 7 to get image url from with extended attribute image:
$.createHREFForImage(fileid = item.getValue('extAttributeImage'))

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment