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

Mick Davidson July 19, 2012

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

1 vote
Answer accepted
CharlesH
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 19, 2012
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/
Mick Davidson July 22, 2012

Charles,

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

Cheers.

Mick Davidson August 22, 2012

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.

CharlesH
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 22, 2012

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

Mick Davidson August 22, 2012

Charles,

thanks, that worked!

Cheers.

0 votes
Stefan Eike
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 26, 2013

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

0 votes
Maurycy Widera July 22, 2012

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 :)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events