Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Adding a macro to a new page/blog post automatically

Mark Nixon
Contributor
October 12, 2011

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 at David Simpson Apps
Atlassian Partner
October 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}")

Mark Nixon
Contributor
October 13, 2011

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 at David Simpson Apps
Atlassian Partner
November 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
TAGS
AUG Leaders

Atlassian Community Events