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

This widget could not be displayed.
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

This widget could not be displayed.
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
Community showcase
Posted yesterday in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

134 views 1 4
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