User macro not working: Horizontal scroll bar appearing and excerpt not working with include

Michelle Fadelli July 2, 2021

Good morning,

I am trying to write my first macro...and it is not working as expected.

1. When it is added to a page and there is more than one line of text in the $body it is displaying with a horizontal scroll bar.

2. I tried to use it with the excerpt include macro and the $body text is not appearing.

Any assistance would be appreciated, here's how I pulled it together:

## @param Url:title=Image URL|type=string|required=true|desc=Link for the background image

## Use UI Image to create hero banner using page name and specified height
<ac:layout>
<ac:layout-section ac:type="single">
<ac:layout-cell>
<p>
<ac:structured-macro ac:name="ui-image" ac:schema-version="1">
<ac:parameter ac:name="imageUrl">"${paramUrl}"</ac:parameter>
<ac:parameter ac:name="title">$content.title</ac:parameter>
<ac:parameter ac:name="height">200px</ac:parameter>
</ac:structured-macro>
</p>
</ac:layout-cell>
</ac:layout-section>

## Add three columns with navigation elements in UI expand
<ac:layout-section ac:type="three_equal">
<ac:layout-cell>
<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:name="ui-expand" ac:schema-version="1">
<ac:parameter ac:name="title">Content on page</ac:parameter>
<ac:rich-text-body>
<p>
<ac:structured-macro ac:name="toc" ac:schema-version="1">
<ac:parameter ac:name="maxLevel">2</ac:parameter>
</ac:structured-macro>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
</ac:layout-cell>
<ac:layout-cell>
<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:name="ui-expand" ac:schema-version="1">
<ac:parameter ac:name="title">Attachments on page</ac:parameter>
<ac:rich-text-body>
<p>
<ac:structured-macro ac:name="attachments-list" ac:schema-version="1"/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
</ac:layout-cell>
<ac:layout-cell>
<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:name="ui-expand" ac:schema-version="1">
<ac:parameter ac:name="title">Related content</ac:parameter>
<ac:rich-text-body>
<p>
<strong>
<ac:structured-macro ac:name="pagetree" ac:schema-version="1"/>
<br/>
</strong>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
<p class="auto-cursor-target">
<br/>
</p>
</ac:layout-cell>
</ac:layout-section>

## Add DivBox and Excerpt Macro with forced formatting
<ac:layout-section ac:type="single">
<ac:layout-cell>
<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:name="divbox" ac:schema-version="1">
<ac:parameter ac:name="style">font-size:18px;font-weight-400</ac:parameter>
<ac:rich-text-body>
<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:name="excerpt" ac:schema-version="1">
<ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
<ac:rich-text-body>
<p>$body</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
</ac:layout-cell>
</ac:layout-section>

 

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events