Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,293,872
Community Members
 
Community Events
165
Community Groups

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

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
Community showcase
Published in Confluence

Confluence: Where work and wellness meet

Feeling overwhelmed by the demands of work and life? With a 25% increase in the prevalence of anxiety and depression worldwide during the pandemic, for most of us, it’s a resounding yes . 🙋‍♀️ ...

768 views 5 21
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you