Skip to content

Instantly share code, notes, and snippets.

@JonasEriksson
Forked from Dan4IT/templatevars.cfm
Last active March 11, 2017 10:49
Show Gist options
  • Save JonasEriksson/da08b9f978952d856f0b to your computer and use it in GitHub Desktop.
Save JonasEriksson/da08b9f978952d856f0b to your computer and use it in GitHub Desktop.
Mura Template Variables
<!--- Note JE: This reveals a bit much if used on a live server, so I added a simple IP check --->
<cfif cgi.REMOTE_ADDR EQ "myIPaddress">
#$.siteConfig('themeAssetPath')#
#$.siteConfig('assetPath')#
<cfdump var="#$.siteConfig().getAllValues()#">
#$.siteConfig('domain')#
<cfdump var="#$.content().getAllValues()#">
#$.content('metaKeywords')#
<cfif len($.siteConfig('contactname'))>#$.siteConfig('contactname')#</cfif>
<a href="#$.createHREF(filename=$.content('filename'))#">Link To This Page...</a>
<cfif len($.siteConfig('contactname'))>#$.siteConfig('contactname')#</cfif>
<cfif len($.siteConfig('contactaddress'))>#$.siteConfig('contactaddress')#, </cfif><cfif len($.siteConfig('contactcity'))>#$.siteConfig('contactcity')#</cfif>
<cfif len($.siteConfig('contactstate'))>#$.siteConfig('contactstate')#</cfif>, <cfif len($.siteConfig('contactzip'))>#$.siteConfig('contactzip')#</cfif>, Australia
<cfif len($.siteConfig('contactphone'))>Phone: #$.siteConfig('contactphone')#</cfif>
<cfif len($.siteConfig('contactemail'))>Email: <a href="mailto:#$.siteConfig('contactemail')#">#$.siteConfig('contactemail')#</a></cfif>
<cfelse>
n/a
</cfif>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment