Include
The include embedding transcludes the content of another page, or a single
section of it, into the current page. See https://github.com/redimp/otterwiki/issues/547.
All examples below pull from the Embedding/Include/Source page.
Include a whole page
{{include|src=/Embedding/Include/Source}}
Include a single section
Sections are selected by their heading anchor, the same slug used for heading links, independent of the heading level.
{{include|src=/Embedding/Include/Source|section=installation}}
Include a section without its heading
Use heading=false to drop the section's own heading line and pull in only its
body.
{{include|src=/Embedding/Include/Source|section=subsection|heading=false}}
Include a section without its sub-sections
By default child sections are included. With children=false only the content
directly below the heading is transcluded (the Details sub-section is left
out here).
{{include|src=/Embedding/Include/Source|section=subsection|children=false}}
Relative source path
A src that does not start with / is resolved relative to the current page,
so this page can reach its own sub-pages without spelling out the full path.
{{include|src=Include/Source|section=introduction}}
Reusing a snippet
A common use is a single-source snippet that is maintained once and reused on many pages.
{{include|src=/Embedding/Include/Snippet}}
Error handling
An unknown page or section reports an error instead of failing silently; a missing section also lists the anchors that are available.
{{include|src=/Embedding/Include/Source|section=does-not-exist}}
include Error: include: section "does-not-exist" not found in "/Embedding/Include/Source" (available: source, introduction, subsection, details, installation).
