Rendering/Parsing Mura Tags

Since parsing Mura tags means that content managers are able to enter dynamic code within form fields (e.g, Content and Summary areas), it's important that you understand how to control this behavior.


In the file located at /config/settings.ini.cfm is a global setting that allows you to enable or disable the rendering of Mura tags. It defaults to true.

You can also explicitly disable or enable the Mura tag on a site-by-site basis, by adding this.enableMuraTag={true | false} to the Site's contentRenderer.cfc or the theme's eventHandler.cfc:onRenderStart() method, you could add
$.getContentRenderer().enableMuraTag={true | false}


Mura also has a special helper method called $.setDynamicContent() to wrap around CFML variables and/or function calls to evaluate any string that may contain Mura tags. 

For example, if you were to simply output the Content body of any particular content node that contains Mura tags, they would not render. Let's assume you had entered the following into your Content body area:

In your CFML template, you might have something like this:

When this code ends up at the CFML server, it has no idea that those Mura tags are supposed to be evaluated, so it would simply output what you entered:

All you need to do is wrap the helper method around the output on your CFML template:

Would output:

Tip: This method is actually what happens under the hood when using $.dspBody() to output the Content body.

So, just to review, only use Mura tags in form fields within Mura CMS. Mura will then simply replace the Mura tags with number/hash signs for you.