Template:Assistant/extract doc

From Wikibooks, open books for an open world
Jump to navigation Jump to search
Template documentation[view] [edit] [history] [purge]


Usage[edit source]

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 Usage of template documentation page {{ASSTTEMPLATE}}/page/doc (or, if page is specified blank, {{ASSTTEMPLATE}}/doc). If optional named parameter rooted is non-blank, the documentation section is sought in a subpage of the assistant root page, {{ASSTROOT}}/page/doc, rather than in template space. If optional named parameter assistant 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 continue is non-blank, extraction continues beyond the Usage section, stopping only if a See also section is encountered.

When transcluded on a template {{ASSTTEMPLATE}}/page or assistant subpage {{ASSTROOT}}/page, this template provides a message identifying the assistant, extracts the content of section page of central assistant documentation page {{ASSTROOT}}/doc, 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 page.

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

Internals[edit source]

Section extraction is via {{assistant/extract section}}.

See also[edit source]

Template:Assistant/extract section Template:AssistantCat Template:ASSTROOT Template:ASSTTEMPLATE Template:OBJECTPAGENAME Template:ASSTDOC Template:ASSTSUB