Skip to content

Instantly share code, notes, and snippets.

@jsieber
Last active December 14, 2023 10:18
Show Gist options
  • Save jsieber/201da5bfce8617c02ac2 to your computer and use it in GitHub Desktop.
Save jsieber/201da5bfce8617c02ac2 to your computer and use it in GitHub Desktop.
Mura CMS release date at top of content
function onPageBodyRender($) {
// add release date to top of blog posts. Include contentID of parent in if statement.
if ($.content('parentID') eq '57B92471-11BA-4759-937182D9ADED7226') {
return "<p id='releaseDate'><i class='ion-calendar'></i> #dateformat($.content('releaseDate'), 'medium')# #timeFormat($.content('releaseDate'), 'medium')#</p>" & $.setDynamicContent($.content('body'));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment