Forums

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

Excerpt defined via user macro is not visible in content-by-label lists, etc.

Dmitry Radzevich
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 21, 2018

I have the following user macro to automate creating page headers with ToC and some hints on the page purpose. The same hint text is used to render the Info macro and as the body of the Excerpt macro.

But when such pages are included into various lists (e.g. the Content by Label macro with Simple excerpt rendering option) - no excerpts from them are shown. Pages with verbatim Excerpt macros show their excerpts correctly.

Is that a bug? Or do I do something wrong?

User Macro Body:

## @noparams 

#if ($content.id == $action.getHelper().getPage().id)
<ac:macro ac:name="excerpt">
<ac:parameter ac:name="hidden">true</ac:parameter>
# <ac:parameter ac:name="atlassian-macro-output-type">BLOCK</ac:parameter>
<ac:rich-text-body>
$body
</ac:rich-text-body>
</ac:macro>

<ac:macro ac:name="panel">
<ac:parameter ac:name="printable">true</ac:parameter>
<ac:rich-text-body>
<ac:macro ac:name="toc">
<ac:parameter ac:name="printable">true</ac:parameter>
<ac:parameter ac:name="maxLevel">4</ac:parameter>
<ac:parameter ac:name="type">list</ac:parameter>
<ac:parameter ac:name="outline">true</ac:parameter>
</ac:macro>
</ac:rich-text-body>
</ac:macro>

<ac:macro ac:name="info">
<ac:rich-text-body>
$body
</ac:rich-text-body>
</ac:macro>
#end

P.S.: could it be because the whole macro body is supposed to be not shown on pages that include this page (see #if construct)? The idea is that if such pages are Include'd - their excerpts shouldn't mess with the Excerpt macro of the host page (if any).  

P.P.S.: tried w/o the #if, same problem - excerpts are not pulled from pages with this user macro.

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events