Template:Assistant/extract doc/doc

Usage
This template can be used to extract documentation on a template in an assistant either from the template documentation page to the central documentation page of the assistant, or vice versa.

When transcluded with unnamed parameter page, this template extracts the contents of section  of template documentation page   (or, if page is specified blank,  ). If optional named parameter  is non-blank, the documentation section is sought in a subpage of the assistant root page, , rather than in template space. If optional named parameter  is non-blank, that assistant name is used for the extraction instead of deducing the assistant name from the transcluding page name. If optional named parameter  is non-blank, extraction continues beyond the   section, stopping only if a   section is encountered.

When transcluded on a template  or assistant subpage , this template provides a message identifying the assistant, extracts the content of section   of central assistant documentation page  , and categorizes the transcluding page via AssistantCat. Alternatively, if the documentation page has a section whose name is the full page name of the transcluding page, that section is used in preference over.

Either way, the extracted content should be written to behave correctly when transcluded; suitable section links may be generated via ASSTDOCLINK.

Internals
Section extraction is via assistant/extract section.