Children
For the children!
Think of the children!!
Use the children shortcode to list the child pages of a page and the further descendants (children’s children). By default, the shortcode displays links to the child pages.
Parameter | Default | Description |
---|---|---|
page | current | Specify the page name (section name) to display children for |
style | “li” | Choose the style used to display descendants. It could be any HTML tag name |
showhidden | “false” | When true, child pages hidden from the menu will be displayed |
description | “false” | Allows you to include a short text under each page in the list. When no description exists for the page, children shortcode takes the first 70 words of your content. Read more info about summaries on gohugo.io |
depth | 1 | Enter a number to specify the depth of descendants to display. For example, if the value is 2, the shortcode will display 2 levels of child pages. Tips: set 999 to get all descendants |
sort | none | Sort children by Weight - to sort on menu order, Name - to sort alphabetically on menu label, Identifier - to sort alphabetically on identifier set in frontmatter, and URL - to sort by URL |
{{% children %}}
{{% children description="true" %}}
- children-3 Title
- title-for-children-1
- title-for-children-2
Description of children-3 page
stub page for children-1
stub page for children-2
{{% children depth="3" showhidden="true" %}}
- children-3 Title
- title-for-children-1
- title-for-children-2
{{% children style="h2" depth="3" description="true" %}}
children-3 Title
Description of children-3 page
grandchildren-3-3 title
Description of grand children-3-3 page
great grand children-3-3-1 Title
Description of great grand children-3-3-1 page
grandchildren-3-1 title
Description of grandchildren-3-1 page
greatgrandchildren-3-1-1 title
Description of greatgrandchildren-3-1-1 page
Grandchildren-3-2 title
Description of grandchildren-3-2 page
great grandchildren-3-2-1 title
Description of greatgrandchildren-3-2-1 page
title-for-children-1
stub page for children-1
title-for-children-2
stub page for children-2
title-for-grandchildren-2-1
description for grandchildren-2-1
title-for-grandchildren-2-2
description for grandchildren-2-2
{{% children style="div" depth="999" %}}