Create a Glossary in Confluence 4.x - How do I call a multi excerpt include dynamically

Hi guys:

I'm trying to create a glossary for confluence by following the follwing article: http://jodiem.com.au/2011/08/13/building-a-glossary-in-confluence/

Becuase this is an old article I'm trying to do the same but in Confluence 4.x and I almost had everything working except for the detail that when the glossary link macro is used within the confluence main document it always shown that it found the page Glossary but not the excerpt.

I created two macros:

The create term macro (this is the one used in the Glossary page):

##############################################################

## @param tooltip:title=Tooltip|type=string|required=true|desc=Tooltip

## @param name:title=Name|type=string|required=false|desc=Name

## @param phrase:title=Phrase|type=string|required=false|desc=phrase

<h3>

<ac:macro ac:name="anchor">

<ac:default-parameter>$paramname</ac:default-parameter>

</ac:macro>$paramphrase

</h3>

<ac:macro ac:name="cloak">

<ac:parameter ac:name="id">$paramname</ac:parameter>

<ac:rich-text-body>

<ac:macro ac:name="multiexcerpt">

<ac:parameter ac:name="MultiExcerptName">$paramname</ac:parameter>

<ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>

<ac:rich-text-body>

<a style="text-decoration:none; border-bottom:2px dotted; border-bottom-color:#008000" title="$paramtooltip" href="Glossary#$paramname">$paramphrase</a>

</ac:rich-text-body>

</ac:macro>

</ac:rich-text-body>

</ac:macro>

$body

#################################################################

and the glossary link macro (the one that is used in main pages)

#################################################################

## @param name:title=Name|type=string|required=false|desc=Name

<ac:macro ac:name="multiexcerpt-include">

<ac:parameter ac:name="MultiExcerptName">$paramname</ac:parameter>

<ac:parameter ac:name="PageWithExcerpt">Glossary</ac:parameter>

<ac:parameter ac:name="nopanel">true</ac:parameter>

</ac:macro>

#################################################################

Any help will be appreciated. If more info is needed just let me know

2 answers

1 accepted

0 votes
Accepted answer

I also just stumbled upon a 2 part blog that outlines how to create this configuration that doesn't rely on the multi-exerpt-include macro that should get this functionality in place for you:

http://blogs.atlassian.com/2013/01/how-to-building-a-company-glossary-with-confluence/

http://blogs.atlassian.com/2013/01/how-to-building-a-company-glossary-with-confluence-part-two/

I tested your user macros locally, and they seem to be fine. I think this is a bug in Artemis's multi-excerpt macro. If you inspect the source of a page with your 'term' macro rendered (via Source Editor), it shows up like this:

&lt;ac:macro ac:name="term"&gt;
  &lt;ac:parameter ac:name="phrase"&gt;My Phrase&lt;/ac:parameter&gt;
  &lt;ac:parameter ac:name="name"&gt;Term Name&lt;/ac:parameter&gt;
  &lt;ac:parameter ac:name="atlassian-macro-output-type"&gt;BLOCK&lt;/ac:parameter&gt;
  &lt;ac:parameter ac:name="tooltip"&gt;My Hover Text&lt;/ac:parameter&gt;
  &lt;ac:rich-text-body&gt;This is a definition of things.&lt;/ac:rich-text-body&gt;
&lt;/ac:macro&gt;

Then, inspect the source of the rendered page in Firebug or Chrome Dev mode, and you can see that the cloak macro and header macro were able to interpret the $paramname object:

&lt;span class="confluence-anchor-link" id="Glossary-TermName"&lt;/span&gt;
&lt;h3 id="Glossary-MyPhrase"&gt;My Phrase&lt;/h3&gt;
&lt;h3 id="Glossary-TermName"&gt;Term Name&lt;/h3&gt;
&lt;span id="content_Term Name" class="cloak" style="display: none"&gt;

&lt;a style="text-decoration:none; border-bottom:2px dotted; border-bottom-color:#008000" title="My Hover Text" href="Glossary#Term Name" rel="nofollow"&gt;My Phrase&lt;/a&gt;

&lt;/span&gt;

Anchor correctly created the "Glossary-TermName" id, and cloak created the "content_Term Name" id. Artemis, the creator of the multi-excerpt plugin, has their support contact details and a link to their Marketplace JIRA instance here. They should be able to help you sort it out, or confirm the bug.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Monday in Confluence

Organizing your space just got easier - Page Tree Drag & Drop is here

Hi Community! I’m Elaine, Confluence Product Manager. You may have read my earlier post about page tree in space navigation sidebar. I'm excited to share another improvement that helps you organize ...

58 views 3 2
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