setDynamicContent - Mura Docs v7.0


A Mura Scope helper method to render Mura [m] tags. This function checks a string for Mura [m] tags, and if found, will pass the variable or function call the the CFML server for processing before final rendering of the page.

Function Syntax

m.setDynamicContent( string )


Parameter Type Req/Opt Default Description
string string Opt empty string

This is the string to parse for Mura [m] tags.


Use this function to search through a string for Mura [m] tags. Most use cases revolve around user-entered text that may, or may not, contain Mura [m] tags, such as the "Summary" field of a content item.


You can wrap this method around any string, or anticipated string, to render Mura [m] tags.

Basic Example

The following is a very basic example to illustrate how to output an explicit string containing Mura [m] tags.

<cfset exampleString = "Today is [m]DateFormat(Now(), 'yyyy-mm-dd')[/m]" />

Content Summary

The following example illustrates how to output a content item's "Summary" field, if you expect it may contain Mura [m] tags. You could apply this method to nearly any text field of a content item.