Page Info Macro displays source page info when nested on other pages with the Include Excerpt macro

Rob Powers November 24, 2017

I have a created a standard wiki template for a wiki subspace but people (being people) sometimes forget to use it, so I want to be able to copy the template header into those new pages, to maintain at least the semblance of uniformity.

The template header includes "created by" and "modified by" info via the Page Information Macro. I excerpt the template header on the template page but when I include it on another page via the Excerpt Include macro it shows the wrong Page Info (i.e. created-user/date, modified-user/date).

Can I nest these macros together or should I just copy the template header directly into these other pages? If I change the template header in the future, then I'd like to avoid a copy & paste into every page in the wiki subspace that wasn't created using the standard template.

1 answer

1 accepted

1 vote
Answer accepted
Christo Mastoroudes [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 5, 2017

Hi,

The Excerpt macro only shows the content of the other page, so what you describe seems consistent with what I would expect to see.

As for your goal of having pages in a space have the same look and feel, You can edit the default page layout for pages in a specific space.

Navigate to: Space Tools(bottom left when on a page)-->Look and Feel-->Layout-->edit the page layout.

Search for the <div id="main-content" class="wiki-content"> element. Then just above the $body variable we can add some custom content, something like this: 

This adds some meta data to each page in a space.

<div id="main-content" class="wiki-content">
<div>
Created by: $page.creator.getName()
</div>
<div>
Last modified time: $confPage.getLastModificationDate()
</div>
<div>
Last modified by: $confPage.getLastModifier().getFullName()
</div>
$body
</div>

 

This will propagate to all the pages in the space so use with care.

 

If the answer solves your question, please mark it as accepted so that other people with the same question can benefit from it.

Rob Powers December 5, 2017

The issue is that I'm not the space admin. I'm just trying to control the look & feel of a sub-space sized area for my team, we also don't want to create more spaces because that just silos information. If I want to enforce a consistent page layout, I guess I'll need to copy & paste the header on to all our pages.

thanks

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events