Children
- 🐺
Children
🧒👶 - Create a toc-like list of sub-pages of the page in question.
- Think of the children!!
- Use the children shortcode to list the child pages of a page and any further descendants (childrens’ children).
By default, the shortcode emits links to the child pages.
The shorcode will not enumerate pages within leaf pagebundles. Only branch pages are traversed
Usage #
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. More info..2 |
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 |
Demo #
Simplest Usage #
With descriptions #
{{< children description=“true” >}}
- Children-1 Branch Pagebundle
- Children-2 Branch pagebundle
- Children-3 Branch Pagebundle
- πΆπ―π£ Children-3
- Branch pagebundle.
- Children-4 Leaf Pagebundle
stub branch pagebundle for children-1.
Branch pagebundle for children-2
No description or summary.
Children-4 Leaf pagebundle. With two grandchildren subleaf pages
Without descriptions #
{{< children >}}
Use HTML Heading elements #
{{< children style=“h2” description=“true” >}}
- πΆπ―π£ Children-3
- Branch pagebundle.
Children-1 Branch Pagebundle
stub branch pagebundle for children-1.
Children-2 Branch pagebundle
Branch pagebundle for children-2
Children-3 Branch Pagebundle
No description or summary.
Children-4 Leaf Pagebundle
Children-4 Leaf pagebundle. With two grandchildren subleaf pages
- πΆπ―π£ Children-3
- Branch pagebundle.
Children-1 Branch Pagebundle
stub branch pagebundle for children-1.
Children-2 Branch pagebundle
Branch pagebundle for children-2
Children-3 Branch Pagebundle
No description or summary.
Children-4 Leaf Pagebundle
Children-4 Leaf pagebundle. With two grandchildren subleaf pages
{{< children style=“h3” description=“true” >}}
Include subpages that would otherwise be hidden: #
If the parameter showhidden
is used, regardless of value, hidden pages will be listed:
{{< children depth=“4” showhidden=“0” >}}
{{< children depth=“4” >}}
Specify the traversal depth and use HTML Heading elements #
{{< children style=“h2” depth=“4” description=“true” >}}
- πΆπ―π£ Children-3
- Branch pagebundle.
Children-1 Branch Pagebundle
stub branch pagebundle for children-1.
Children-2 Branch pagebundle
Branch pagebundle for children-2
GrandChildren 2-1 Branch pagebundle
Branch pagebundle for grandchildren-2-1
GrandChildren 2-2 Branch pagebundle
branch pagebundle for GrandGhildren-2-2
Children-3 Branch Pagebundle
No description or summary.
Grandchildren-3-3 Branch Pagebundle
Description of grand children-3-3 branch pagebundle
Great Grand Children-3-3-1 Branch Pagebundle
Description of great grand children-3-3-1 branch pagebundle
GrandChildren-3-1 Branch Pagebundle
Description of grandchildren-3-1 Branch Pagebundle
GreatGrandChildren-3-1-1 Branch Pagebundle
Description of greatgrandchildren-3-1-1 Branch Pagebundle
Grandchildren-3-2 Branch Pagebundle
Description of grandchildren-3-2 Branch pagebundle
Great Grandchildren-3-2-1 Branch Pagebundle
Description of greatgrandchildren-3-2-1 Branch Pagebundle
Children-4 Leaf Pagebundle
Children-4 Leaf pagebundle. With two grandchildren subleaf pages
Use HTML div
elements #
Without descriptions #
{{< children style=“div” depth=“999” >}}
With descriptions #
- πΆπ―π£ Children-3
- Branch pagebundle.
stub branch pagebundle for children-1.
Branch pagebundle for children-2
Branch pagebundle for grandchildren-2-1
branch pagebundle for GrandGhildren-2-2
No description or summary.
Description of grand children-3-3 branch pagebundle
Description of great grand children-3-3-1 branch pagebundle
Description of grandchildren-3-1 Branch Pagebundle
Description of greatgrandchildren-3-1-1 Branch Pagebundle
Description of grandchildren-3-2 Branch pagebundle
Description of greatgrandchildren-3-2-1 Branch Pagebundle
Children-4 Leaf pagebundle. With two grandchildren subleaf pages
{{< children style=“div” depth=“999” description=“true” >}}