Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ronnieduke/a3a7ce6f6efbf64b564b to your computer and use it in GitHub Desktop.
Save ronnieduke/a3a7ce6f6efbf64b564b to your computer and use it in GitHub Desktop.
<!--- Assuming you've created an extended attribute 'File' type called 'extAttributeImage' --->
<!--- In a Mura Page Template --->
#$.createHREFForImage(fileid=$.content('extAttributeImage'),size='myCustomSize')#
<!--- In a Mura Component --->
#$.createHREFForImage(fileid=$.component('extAttributeImage'),size='myCustomSize')#
<!--- From a site extended attribute --->
#$.createHREFForImage(fileid=$.siteConfig('extAttributeImage'),size='myCustomSize')#
<!--- In the context of an iterator --->
#$.createHREFForImage(fileid=item.getExtAttributeImage(),size='myCustomSize')#
@eightmad
Copy link

eightmad commented Jul 7, 2015

When i tried this, i got an error:
The parameter fileID to function readMeta is required but was not passed in.

I have fixed this by changing to:

$.createHREFForImage(fileID=$.component('extAttributeImage'), size='myCustomSize')#

Maybe for others who are having the same error

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