Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to break the children display macro into two columns?

I'm using the children display macro to show a list of pages under a certain page, but the list is too long and I'd like to break it into two columns to make it more readable and make the layout of the page nicer. 

Is this possible at all with children display macro? If not, what tool would you recommend? 

 

Cheers!

3 answers

It is possible with CSS and a custom macro. What I did was,

  1. Added the following CSS to my space stylesheet:

    .childpagemulticolumn ul{  

        display: flex;  

        flex-direction: column;  

        flex-wrap: wrap;  

        max-height: 300px;  

    }  

     

  2. You can then create a custom macro :
    The Macro Body Processing should be 'Rendered'

    ## @noparams
    <div class="childpagemulticolumn">$body</div>

  3. Now in your page with Children Display macro: 
    Insert this new custom macro and then insert 'Children Display' macro inside this new custom macro.

PS: I have admin access so I am able to edit space stylesheet and create custom macro.

@Samjad Kollanandy I tried implementing your solution, but it seems this no longer works. I have created the custom user macro and edited the space style sheet, both using the code you provided above, but I still get a single column display of the child pages. Any ideas what I might have gotten wrong (or if something has changed)?

macro.PNGstylesheet.PNGpage-edit.PNGpage-rendered.PNG

Hi @Paul Mata ,

I see that you have set childrendisplay macro style=h3.

So in the stylesheet remove ul and li, -

.childpagemulticolumn {

...

...

}

hello,

 

A workaround would be to display the first n/2 children in a first "children macro", then on a second one to have them displayed in a reverse sort.

 

Macro #1 :

Number of Children : n/2

- Sort Children By : title

- reverse sort : false

 

Macro #2 :

Number of Children : n/2

- Sort Children By : title

- reverse sort : true

*moved reply under correct comment*

0 votes
Shannon Atlassian Team Oct 19, 2017

Hi Alireza,

The native Children Display macro is not able to be displayed in more than one column. This was requested as a feature in the past but has been rejected.

You could try manually inserting the links to child pages, or see if you download the Source Editor add-on, you may be able to directly alter the formatting.

Kind Regards,
Shannon

Shame, would have been a very useful feature

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence

Confluence Mythbusters: Does Atlassian even use Confluence?

Hi, Confluence collaborators! As part of #Confluence-Collaboratory month, we’ve created a very special Mythsbusters segment, where we're dive into an interesting myth and uncover the truth behind i...

1,366 views 7 28
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