Adding the release date to Mura CMS content

Sep 3, 2014 10:20:00 PM

Do you have a section in your Mura CMS site for blog posts of press releases that you would like to display the release date at the top of each page? There are a couple of ways that this could be accomplished. You could create a component that uses the Mura tag to display the release date, $.content('releaseDate'), and then include it into the content body of each page using the mura tag within the editor. Or, you could use the onPageBodyRender event and your theme or site eventHandler to do the work for you.

As I consider this to be a theme related modification, I've decided to include the following into my theme eventHandler.cfc. Remember that changes to the theme based eventHandler.cfc require a reload of the application to take effect.

A conditional statement is used to define the content node that you would like the release date added to. You also have to define the release date when publishing your content or use the created date instead.

Comments

Post a Comment