Adding a macro to a new page/blog post automatically

Hi All,

I have a rate macro I want to be on the bottom of all new pages and blogs that are created. Is there an easy way to achieve this?

Thanks
Mark

2 answers

4 votes
David Simpson Community Champion Oct 12, 2011

If you're feeling adventurous, you could create a Confluence plugin that listens for page & blog creation events and appends the macro to the end of the page.

Failing that, consider adding it to the theme see /confluence/decorators/page.vmd & /confluence/decorators/blogpost.vmd in the Confluence installation directory for where youd add them.

e.g.

$helper.renderConfluenceMacro("{macro-name-here}")

Im having some trouble with that - in which section would the code be inserted? Have tried in the Page Specific Decoratoor and General Page Decorating with no luck... i've tried top add the code to every section (not at once) with no luck....

Thanks

1 vote
David Simpson Community Champion Nov 15, 2011

Mark: I've done a quick (very rough) how to video for adding the macro to all page/blogpost decorators: http://youtu.be/snfSkTyOGQ0

I hope this helps.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Confluence

Three common content challenges + how to manage them

An efficient enterprise content management system, or ECM, is a must-have for companies that create work online (cough   cough, all companies). If content calendars, marketing plans, and bu...

89 views 0 6
Read article

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