Last active
August 4, 2016 05:02
-
-
Save stevewithington/6383472 to your computer and use it in GitHub Desktop.
Mura CMS : How to dynamically append the content release date to the body area.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
// drop this in your eventHandler.cfc | |
public any function onRenderStart($) { | |
var local = {}; | |
if ( Right($.content('parentid'), 3) != 'END' && ListFindNoCase('News,Blog', $.content().getParent().getTitle()) && Len($.content('releaseDate')) ) { | |
local.newContent = '<h3>By #HTMLEditFormat($.content("credits"))#</h3><p class="releaseDate">#LSDateFormat($.content('releaseDate'))#</p>' & $.content('body'); | |
$.content('body', local.newContent); | |
} | |
} | |
</cfscript> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment