This documentation is deprecated. Adaptavist's documentation has moved to a new location where it is maintained and updated. Please visit Adaptavist's new Documentation area.
children macro
The {children} macro displays lists of child pages attached to the current page or orphan pages that are not attached to any page...
Properly organised sites use hierarchies of pages - a bit like a family tree where child pages are related to their parent pages and so on:
The {children} macro is one of the most flexible ways to display the hierarchy of pages for any part of your site, or even display pages that are not attached to a parent page.
If this parameter is set to true then all child pages (with all of thier child pages) will be shown.
depth
1
Use this parameter to choose how many levels of the page hierarchy will be shown (or use the "all" parameter to show all of them).
style
Normally, an unordered list is used to display pages, however you can use this parameter to output the top level of child pages using one of the standard heading styles (h1, h2, h3, h4, h5, h6).
excerpt
false
By default, only the page titles are shown unless you set this parameter to true in which case excerpts are shown alongside the page titles.
page
By default, the list of child pages is shown starting with the current page. You can use this parameter to start from a different page if desired.
first
Sometimes a page may have vast number of child pages attached to it - if so, you might want to use this parameter to specify the maximum number of pages that are output.
sort
title
Pages are normally sorted alphabetically on their title, but you can also sort them by their creation or modified dates.
reverse
false
Set this parameter to true to reverse the sort order of pages.
Examples:
Basic Use
List the pages attached to the current page:
{children}
The result is shown below (we added a single child page to this page):
Note:
This only limits the number of child pages shown at the top level - if you are showing additional levels (see next example) then the limit will not apply to those additional levels.
Displaying Specific Number of Levels
The "depth" parameter allows you to specify how many levels of child pages to show:
There are plans to create a common API for a wide range of macros to ensure that...
There are plans to create a common API for a wide range of macros to ensure that they all have label support, space filtering, content type filtering, etc. It's still early stages, but to keep track of progress, please see the following URL: Unified Page Searching Tags
The fix only applied to the pagetree macro unfortunately. We're hoping that Atla...
The fix only applied to the pagetree macro unfortunately. We're hoping that Atlassian will separate out the children macro in to a normal plugin that we can then more easily modify to add these features back in.
Hi, the Plugin is close to what I am looking for. I need a macro which gets all ...
Hi, the Plugin is close to what I am looking for. I need a macro which gets all the children and displays several information (not only the excerpt) from the child page. It would be great to display this list in a table.
is there anyway of forcing children pages to be displayed in the menu in the req...
is there anyway of forcing children pages to be displayed in the menu in the required order - not alphabetical, not in the most recently amended order, but in a specified order
Not yet - but there soon will be. Confluence 2.8 (currently at Milestone 3 devel...
Not yet - but there soon will be. Confluence 2.8 (currently at Milestone 3 development stage) introduces page ordering so you can set custom ordering of pages and then have macros use that ordering. I'll be doing some QA on our Confluence 2.8 test server early next week but I imagine that this will be feasible (and trivial) to do with the children macro once Confluence 2.8 is released. That being said, there are some major UI changes in Confluence 2.8 so keep an eye on the Builder space for news updates on compatibility with Theme Builder 3.x.
Hello Guy,
Do you have any new information/Macro on how to sort the child pages...
Hello Guy,
Do you have any new information/Macro on how to sort the child pages?
I am looking for a option to change the title with in the macro [sort=title} into a option that allows me tp sort pages in to groups. i.e. 1 group have pages they all the titles end up in NL and an other group all the pagetitles and up in BE
regards,
Elisabeth op 't Holt
Amsterdam
I have this FAQ, 3 levels deep.
I want to create a "ready to print/pdf" version....
I have this FAQ, 3 levels deep.
I want to create a "ready to print/pdf" version. Right now, I use children macro to have a nice dynamic index of the FAQ. But for pdf export, I need the same macro (or similar) to generate in addition or instead of the "toc" a flat one page file of all the children (that I have permissions to vie, just like the children macro).
Folks is it possible to have the children macro put menuseparators between each ...
Folks is it possible to have the children macro put menuseparators between each item it retrieves or is there another way I am not aware of. for example I am using it in a left bar in the builder theme to auto generate the child pages of the space, but I would like to visually break the names with a menu separator.
I have created a menu of the children pages in my Builder Theme layout using chi...
I have created a menu of the children pages in my Builder Theme layout using children:page=Home|all=true|sort=title. My client has changed the name/title of their home pages which causes an error. I tried leaving the page parameter out and the error is resolved until you go to space admin or advanced. Are there any other values that can be used for the page parameter or is there a way to get the page name to use as the paramater?
The error seems to be caused by a limitation/bug with the children macro, as it ...
The error seems to be caused by a limitation/bug with the children macro, as it can't handle pages which aren't confluence pages. Depending on your setup you should be able to overcome this by including the children macro from a page rather than embedding the macro itself, see the following section on reusable menu chunks
My layout replicates the PopKonk Theme. The PopKong theme is no longer being dev...
My layout replicates the PopKonk Theme. The PopKong theme is no longer being developed but the client has used it in all of their spaces so as part of upgrading their wikis to Confluence 3.5, I need to create a theme that looks a closely as possible to the PopKong Theme. The theme is almost done. I replaced the edit and view menus with the Browse and User Profile menus; added the edit and add page icons, and the tools menu to the right and created a tab view of the comments, attachments, children, and labels at the bottom. I just need to get the horizontal pop menu of all of the pages in the space working.
I have tried:
{pop-menu}{children:page=Home|all=true|sort=title} {pop-menu}
//this one does not render if the home page name has been changed
and
{pop-menu}
{sorted-children:@home|depth=999|showPageSiblings=true|showRoot=false}
{pop-menu}
//this eliminates the error but only includes all of the descendants in the menu when viewing the home page
I have also tried some of the other macros available such as the pagetree, builder-children, and list-pages macros that create a hierarchal list of pages but the menus are displayed as a bullet list or include the show children toggle option.
I am not sure how to use the include macro to include the children macro. Could you explain how i can do this?
What you get is the same as including the children macro directly in the menu, but the page the children macro sits on will always have a name so you won't encounter issues like with space admin/advanced pages not being Confluence pages.
You can stop it including the whole thing by using the include-excerpt macro. Ho...
You can stop it including the whole thing by using the include-excerpt macro. However, it will only include it on a per-space basis. You could always use CSS to override the display style for links produced by the other macros you mentioned.
Comments (19)
Mar 31, 2006
Anonymous says:
A great feature to add would to be able to only show children with a particular ...A great feature to add would to be able to only show children with a particular label, or set of labels.
Jul 25, 2006
Anonymous says:
Indeed. {children:depth=1|label=xx,yy} This would make it easy to present filt...Indeed.
{children:depth=1|label=xx,yy}
This would make it easy to present filtered lists of pages, which would be quite invaluable.
If this isn't possible, is there another macro that would allow such a list to be constructed?
Charlie
ETR Associates
Jul 25, 2006
Guy Fraser says:
There are plans to create a common API for a wide range of macros to ensure that...There are plans to create a common API for a wide range of macros to ensure that they all have label support, space filtering, content type filtering, etc. It's still early stages, but to keep track of progress, please see the following URL: Unified Page Searching Tags
Sep 01, 2006
Anonymous says:
Our menus contain a list marked 1, 2, 3, 4... 10, 11, 12, the Macro automaticall...Our menus contain a list marked 1, 2, 3, 4... 10, 11, 12, the Macro automatically lists this as 1, 10, 11, 12, 2, 3, 4, i.e. not iin numerical order.
There was a fix, sort=natural, but this no longer seems to work, can someone enlighten me.
Sep 01, 2006
Guy Fraser says:
The fix only applied to the pagetree macro unfortunately. We're hoping that Atla...The fix only applied to the pagetree macro unfortunately. We're hoping that Atlassian will separate out the children macro in to a normal plugin that we can then more easily modify to add these features back in.
Nov 16, 2006
Anonymous says:
Hi, the Plugin is close to what I am looking for. I need a macro which gets all ...Hi, the Plugin is close to what I am looking for. I need a macro which gets all the children and displays several information (not only the excerpt) from the child page. It would be great to display this list in a table.
Can anybody tell me how to find a solution?
Thx
Jan 31, 2008
john futcher says:
is there anyway of forcing children pages to be displayed in the menu in the req...is there anyway of forcing children pages to be displayed in the menu in the required order - not alphabetical, not in the most recently amended order, but in a specified order
Jan 31, 2008
Guy Fraser says:
Not yet - but there soon will be. Confluence 2.8 (currently at Milestone 3 devel...Not yet - but there soon will be. Confluence 2.8 (currently at Milestone 3 development stage) introduces page ordering so you can set custom ordering of pages and then have macros use that ordering. I'll be doing some QA on our Confluence 2.8 test server early next week but I imagine that this will be feasible (and trivial) to do with the children macro once Confluence 2.8 is released. That being said, there are some major UI changes in Confluence 2.8 so keep an eye on the Builder space for news updates on compatibility with Theme Builder 3.x.
Feb 17, 2011
Elisabeth op 't Holt says:
Hello Guy, Do you have any new information/Macro on how to sort the child pages...Hello Guy,
Do you have any new information/Macro on how to sort the child pages?
I am looking for a option to change the title with in the macro [sort=title} into a option that allows me tp sort pages in to groups. i.e. 1 group have pages they all the titles end up in NL and an other group all the pagetitles and up in BE
regards,
Elisabeth op 't Holt
Amsterdam
Feb 26, 2008
hernan g says:
I have this FAQ, 3 levels deep. I want to create a "ready to print/pdf" version....I have this FAQ, 3 levels deep.
I want to create a "ready to print/pdf" version. Right now, I use children macro to have a nice dynamic index of the FAQ. But for pdf export, I need the same macro (or similar) to generate in addition or instead of the "toc" a flat one page file of all the children (that I have permissions to vie, just like the children macro).
am I missing an obvious way to do it?
Jun 05, 2008
Steve Picton says:
Hi The image displayed in the "Overview" tab appears to show that the branches a...Hi
The image displayed in the "Overview" tab appears to show that the branches are collapsible but when i use the
{children}macro in the side panel its fully expanded. Am i doing something wrong?
Cheers
Mar 25, 2010
Conor Harte says:
Folks is it possible to have the children macro put menuseparators between each ...Folks is it possible to have the children macro put menuseparators between each item it retrieves or is there another way I am not aware of. for example I am using it in a left bar in the builder theme to auto generate the child pages of the space, but I would like to visually break the names with a menu separator.
Jun 14, 2011
Susan Hallwood says:
I have created a menu of the children pages in my Builder Theme layout using chi...I have created a menu of the children pages in my Builder Theme layout using children:page=Home|all=true|sort=title. My client has changed the name/title of their home pages which causes an error. I tried leaving the page parameter out and the error is resolved until you go to space admin or advanced. Are there any other values that can be used for the page parameter or is there a way to get the page name to use as the paramater?
Jun 14, 2011
Gareth Wilson says:
The error seems to be caused by a limitation/bug with the children macro, as it ...The error seems to be caused by a limitation/bug with the children macro, as it can't handle pages which aren't confluence pages. Depending on your setup you should be able to overcome this by including the children macro from a page rather than embedding the macro itself, see the following section on reusable menu chunks
Jun 14, 2011
Susan Hallwood says:
My layout replicates the PopKonk Theme. The PopKong theme is no longer being dev...My layout replicates the PopKonk Theme. The PopKong theme is no longer being developed but the client has used it in all of their spaces so as part of upgrading their wikis to Confluence 3.5, I need to create a theme that looks a closely as possible to the PopKong Theme. The theme is almost done. I replaced the edit and view menus with the Browse and User Profile menus; added the edit and add page icons, and the tools menu to the right and created a tab view of the comments, attachments, children, and labels at the bottom. I just need to get the horizontal pop menu of all of the pages in the space working.
I have tried:
{pop-menu}{children:page=Home|all=true|sort=title} {pop-menu} //this one does not render if the home page name has been changed and {pop-menu} {sorted-children:@home|depth=999|showPageSiblings=true|showRoot=false} {pop-menu} //this eliminates the error but only includes all of the descendants in the menu when viewing the home pageI have also tried some of the other macros available such as the pagetree, builder-children, and list-pages macros that create a hierarchal list of pages but the menus are displayed as a bullet list or include the show children toggle option.
I am not sure how to use the include macro to include the children macro. Could you explain how i can do this?
Jun 14, 2011
Gareth Wilson says:
On a page, say called 'menu' in space with key 'ds', you add the child macro {c...On a page, say called 'menu' in space with key 'ds', you add the child macro
{children:page=Home|all=true|sort=title}Then in your theme you use:
{menubar:id=demo4} {wikimenu}{include:ds:menu}{wikimenu} {menubar}What you get is the same as including the children macro directly in the menu, but the page the children macro sits on will always have a name so you won't encounter issues like with space admin/advanced pages not being Confluence pages.
Jun 14, 2011
Susan Hallwood says:
The above example includes the entire Home page contents on every page and only ...The above example includes the entire Home page contents on every page and only works for one space.
I need it to work for all of the spaces.
Jun 14, 2011
Gareth Wilson says:
You can stop it including the whole thing by using the include-excerpt macro. Ho...You can stop it including the whole thing by using the include-excerpt macro. However, it will only include it on a per-space basis. You could always use CSS to override the display style for links produced by the other macros you mentioned.
Jun 14, 2011
Susan Hallwood says:
Hmm..CSS to overribd the display of the list-pages may be a possibility. I will ...Hmm..CSS to overribd the display of the list-pages may be a possibility. I will try it out and let you know how it goes.
Thanks for you help.