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

How to break the children display macro into two columns?

Alirezza Motti October 18, 2017

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

1 vote
Samjad Kollanandy April 12, 2019

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.

Paul Mata January 18, 2021

@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

Samjad Kollanandy February 1, 2021

Hi @Paul Mata ,

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

So in the stylesheet remove ul and li, -

.childpagemulticolumn {

...

...

}
1 vote
Sorana CAPALNEAN February 5, 2019

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

Paul Mata January 18, 2021

*moved reply under correct comment*

Alex February 9, 2022

That worked! Thank you! 

Oscar May 6, 2022

the Number of Children : n/2 filter doesn't seem to apply...Any pointers?

 

I should add that the number of children is dynamic on my page so I used n...Maybe you used 'n' as a placeholder for the deterministic value of children on your page?

0 votes
Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 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

Jeff Nayler October 25, 2018

Shame, would have been a very useful feature

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events