Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save JonasEriksson/581d2b0bcecf0de05983810f60a447c5 to your computer and use it in GitHub Desktop.
Save JonasEriksson/581d2b0bcecf0de05983810f60a447c5 to your computer and use it in GitHub Desktop.
Mura CMS: Display Logo from Extended Attribute type file in SiteConfig
<!-- Show logo if available in SiteConfig Extended Data Attribute -->
<cfif Len(m.getURLForImage(m.siteConfig('imCompanyLogofile')))>
<cfscript>
img = m.getURLForImage(
fileid = m.siteConfig('imCompanyLogofile') // could be _any_ fileid in Mura
,size = 'Large' // small, medium, large, custom, or any other pre-defined image size
,complete = false // set to true to include the entire URL, not just the absolute path (default)
,siteid = $.event('siteid') // could pull an image from another siteid, if desired
);
</cfscript>
<img src="#img#" alt="#esapiEncode('html_attr', $.siteConfig('imCompanyName'))#">
</cfif>
<!--/.end Show Logo -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment