Can you add plugins/macros to a template in Confluence?

Good Afternoon,

A colleague wants to create a template that includes a plugin. He can do this, but the plugins don't work when he previews the template.

He's created a table in the macro that looks like this (partial view):

||Support office hours | {multi-excerpt:name=SuppOH}<TBC>{multi-excerpt} |

The error msg says:

Error formatting macro: multi-excerpt: java.lang.NullPointerException
TBC

Anyone got any input into this? We're running Confluence 4.2.5.

Cheers.

3 answers

1 accepted

The key to this is that templates require old fashioned wiki markup (for now, in 4.3 it should be improved). The easiest way I have found to prepare wiki markup, even for someone with relevant expertise, is to use a nice utility which will accept content in the new style and produce wiki markup which you can then copy and paste intoma template: http://www.amnet.net.au/~ghannington/confluence/wikifier/rt/ This blog post explains in more detail what it does, with some examples. I've used it on complex pages (panels, tables, HTML regions, scaffold fields, reporting tags...) and its done a perfect job. http://ffeathers.wordpress.com/2012/06/07/how-to-convert-confluence-xml-storage-format-to-wiki-markup/

Charles,

Thanks, I'll pass your info on, but I suspect we'll wait until 4.3 arrives. :)

Cheers.

Charles/anyone,

I'm trying to add the children display macro in a template but you can't do that.

I've tried using the wikifier as shown above, but if I enter {Children Display} it produces some code, but this code also doesn't work either - it results in the Unknown Macro msg.

I've had a look through the user info for info on wiki markup and can't find anything that relates to child pages.

Any idea what the code could be? I'll raise a seperate question about missing macro markup.

Cheers.

Mick,

The markup for the children display macro is {children}. You shoud enter that as is into the template and it should work fine (just tested it myself in Conf 4.2.1 to confirm).

Regards,

Charles

Charles,

thanks, that worked!

Cheers.

I have tried above link and it has converted a working page to

{multiexcerpt:MultiExcerptName=ProdVersion|atlassian-macro-output-type=BLOCK}v1.2.3{multiexcerpt}

I still see the same error message when previewing the template but it actually works when I create a page using the template.

Thanks a lot for your help :)

Hi Maurycy,

You should not care for the template preview. It looks broken most of the time. If it works, it should be fine.

Best regards,

Stefan

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
Posted Tuesday in Uncategorized

Friday fun: how many celebrates Midsummer holiday or is this a Swedish tradition only?

Any other country that celebrates Midsummer holiday (this friday 22 June)?  

34 views 3 1
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