Hey guys,
I would like to split the "Created and last modified by" into parts.
The goal is to have both the creation-date aswell as "last-modified".
Is it possible for pages and blog-entries?
Hi Tim,
Pages and BlogPosts inherit everything from AbstractPage which includes getCreator(), getCreationDate(), getLastModifier() and getLastModificationDate().
What do you want to do exactly, maybe I can help?
Regards
Theresa
Hi Theresa,
it would be perfect if where the "Created and last modified by [...] about 2 hours ago" appears, confluence would show the CreationDate AND next to it the LastModificationDate.
How can I implement it?
Thanks for the answer!
It resolves to something like the following unreadable lines:
#set($page = $blog) #if ($page.isNew()) #set ($dateLink = "$!req.contextPath/pages/viewpreviousversions.action?pageId=$page.id") #else #set ($dateLink = "$!req.contextPath/pages/diffpagesbyversion.action?pageId=$page.id&selectedPageVersions=$page.previousVersion&selectedPageVersions=$page.version") #end #* Note: bunched up else statements are intentional, otherwise we get whitespace that messes up formatting *# #if (!$renderStatic) #set ($authorWithHtml = "#if($page.creatorName) #userLink($page.creator)#else $i18n.getText('anonymous.name')#end") #set ($editorWithHtml = "#if($page.lastModifierName) #userLink($page.lastModifier)#else $i18n.getText('anonymous.name')#end") #else #set ($authorWithHtml = "#if($page.creatorName) $page.creatorName#else $i18n.getText('anonymous.name')#end") #set ($editorWithHtml = "#if($page.lastModifierName) $page.lastModifierName#else $i18n.getText('anonymous.name')#end") #end #set ($authorWithHtml = "<span class='author'>$authorWithHtml</span>") #set ($editorWithHtml = "<span class='editor'>$editorWithHtml</span>")
Without writing a plugin, you could edit the page decorators.
For the blog post page:
You'll find a line like
#parse ("/decorators/includes/page-metadata.vm")
It looks like you're new here. Sign in or register to get started.