Forums

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

User Macro Help

Jonathan Smith
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.
January 7, 2019

Hi all,

  The following user macro expands a table to 100% and is wrapped with an excerpt macro however the table does not appear as 100% width when pulling into an excerpt include macro. Anyone know the code which I can input to make this work in the excerpt include macro? 

Also, any helpful links to learn how to make user macros would be fantastic! Just started dabbling into them.

 

## Macro title: Max Table Width
## Developed by: Jonathan M. Smith
## Date created: 10/12/2018
## @noparams

<style>
.maxtablewidth table.confluenceTable {width: 100%;}
</style>
<div class="maxtablewidth">$body</div>

1 answer

1 accepted

0 votes
Answer accepted
roman
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.
January 9, 2019

Hi @Jonathan Smith,

your macro worked without problems for PP report on my local Confluence 6.13. The table was stretching as a drag a browser window. Which Confluence are you using? Would it be possible to share the storage format of the page with the report?

You have probably read this article, but it's the only resource I know about user macros: https://confluence.atlassian.com/doc/writing-user-macros-4485.html.

Roman.

Jonathan Smith
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.
January 9, 2019

@roman

  Thanks for looking into this. I ended up having a typo - - - I am having issues with the table displaying in the excerpt include macro.

- Jon

roman
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.
January 11, 2019

@Jonathan Smith,

seems to work for me with Excerpt Include: Screenshot 2019-01-11 at 11.35.37.pngHow does it look like for you when you have Excerpt Include in the custom macro and a table without macros?

Roman.

Jonathan Smith
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.
January 11, 2019

@roman,

  Magically everything is working fine now...  I will reopen if needed.

Thanks for testing!

Jonathan

Like roman likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events