How can I add a user macro to the documentation theme's layout

Hi all,

How can I add macro [1] to the documentation theme's page layout please? Confluence only allows to customize the default theme and I tried editing the doctheme.jar files but they dob't work well with the macro.

[1] https://confluence.atlassian.com/display/DISC/Next+and+Previous+Links

5 answers

This widget could not be displayed.

Go to Space Admin -> Themes and select to Configure the documentation theme. Just add the macro to the header or footer section.

This widget could not be displayed.

Thanks Bob. I want to add the macro into the page area rather than the footer.

This widget could not be displayed.

I mean I want the next/previous links in the body of the page. Not the footer. Any idea how to do this please? If went to the Administrator -> Look & Feel -> Layouts but not sure where to edit and how.

This widget could not be displayed.

You can add them to the footer and then use jQuery to move them where you want. E.g.:

<script type="text/javascript">
	jQuery('#prevnext').insertBefore('#main-header');
</script>

(Assuming you've wrapped your buttons in a div with the 'prevnext' id.)

This widget could not be displayed.

I am interested in adding the noprint macro to the Documentation theme.

I have found the following in the Atlassian documentation, but when I add this it doesn't seem to work. I can only find the template code for the noprint macro so maybe I need the wrapper for it as well, but can't figure out what this would be.

Taken from page https://confluence.atlassian.com/display/DOC/NoPrint+Example+of+a+User+Macro, the content for the macro is

## @noparams
<div class="noprint">$body</div>
Also, this has to go into the PDF CSS:.noprint
{
display: none ;
}
I tried putting this into the footer of the Documentation theme as an alternative way to define the macro, but this didn't work either:
## @noparams:title=noprint|type=formatting|desc=excludes content from PDF print version|multiple=true

Can you help me here? Thanks...

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in Teamwork

What teamwork quotes inspire you?

Hey everyone! My name is Natalie and I'm an editor of the Atlassian Blog and I've got a question for you: What's your favorite quote about teamwork?  We've compiled a list here, along with...

177 views 18 7
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you