Children

Arrr! Pirrrates

Fello' pirrates, be awarrre some stuff may not work fer us in this trrranslat'n. Like table of rrramblings, see'ng Merrrmaids, do'ng math or chemistrrry and stuff.

Th' children shorrrtcode lists th' child planks o' th' current plank an' its descendants.

Usage

While th' examples be us'n shorrrtcodes wit' named parameter ye be free t' also call this shorrrtcode from yer own partials.

{{% children sort="weight" %}}
{{ partial "shortcodes/children.html" (dict
  "context" .
  "sort" "weight"
)}}

Parameter

Name Default Notes
containerstyle ul Choose th' style used t' group all children. It could be any HTML tag name.
style li Choose th' style used t' display each descendant. It could be any HTML tag name.
showhidden false When true, child planks hidden from th' menu will be displayed as well.
descript'n false When true shows a short text under each plank 'n th' list. When no descript'n or summary exists fer th' plank, th' first 70 words o' th' rrrambl'n be taken - read more info about summaries on gohugo.io.
depth 1 Th' depth o' descendants t' display. For example, if th' value be 2, th' shorrrtcode will display two levels o' child planks. T' get all descendants, set this value t' a high number eg. 999.
sort see notes Th' sort order o' th' displayed list.

If not set it be sorted by th' ordersectionsby sett'n o' th' ship an' th' planks frontmatter

- weight: t' sort on menu order
- title: t' sort alphabetically on menu label.

Examples

All Default

{{% children  %}}

Wit' Descript'n

{{% children descript'n="true" %}}
  • plank X

    This be a plain plank test, an' th' beginn'n o' a YAML multiline descript'n...

  • plank 1

    This be a demo child plank

  • plank 2

    This be a demo child plank wit' no descript'n. So its rrrambl'n be used as descript'n.

  • plank 3

    This be a demo child plank

Infinite Depth an' Hidden Planks

{{% children depth="999" showhidden="true" %}}

Head'n Styles fer Container an' Elements

{{% children containerstyle="div" style="h2" depth="3" descript'n="true" %}}

plank X

This be a plain plank test, an' th' beginn'n o' a YAML multiline descript'n...

plank 1

This be a demo child plank

plank 1-1

This be a demo child plank

plank 1-1-2

This be a demo child plank

plank 1-1-3

This be a demo child plank

plank 2

This be a demo child plank wit' no descript'n. So its rrrambl'n be used as descript'n.

plank 3

This be a demo child plank

plank 3-1

This be a plain plank test nested 'n a parent

Divs fer Group an' Element Styles

{{% children containerstyle="div" style="div" depth="3" %}}