Last active
December 14, 2023 10:18
-
-
Save jsieber/201da5bfce8617c02ac2 to your computer and use it in GitHub Desktop.
Mura CMS release date at top of content
This file contains 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
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