Module:Transcluder/doc

This module is a transclusion engine, able to transclude any part of any page and with many options that normal transclusion doesn't offer.

Modules
The main entry point for modules is the  method.


 * — Return the wikitext of the requested page
 * — Return the wikitext of the lead section of the requested page
 * — Return the wikitext of the requested section, excluding subsections

The  method always respects and tags. It also removes all categories as well as behavior switches such as, per being generally undesirable when transcluding.

The output can be further modified via the second parameter:


 * — Remove bold text
 * — Remove references
 * — Link the bold title or synonym near the start of the text
 * — Prefix reference names with 'Title ' to avoid name conflicts when transcluding and rescue references defined outside the requested section to avoid undefined reference errors
 * — Include subsections
 * — Get only the files
 * — Get the first list only
 * — Get the first and third tables only
 * — Get the first five paragraphs, except the second

Options can be combined at will:


 * — Get only the paragraphs of the lead section, link the bold text and remove the the references

Finally, the templates can be excluded in various ways:


 * — Keep all templates except  and
 * — Remove all templates except  and
 * — Keep all block templates (templates that take their own line) except
 * — Remove all block templates (templates that take their own line) except
 * — Keep all inline templates (templates in the middle of text) except
 * — Remove all inline templates (templates in the middle of text) except

Besides the  method, the module exposes several other methods to get specific parts of the wikitext. This allows other modules to combine elements in more advanced ways.

Templates
The main entry point for templates is the  method. It's essentially a wrapper of the  method to make it usable for templates. See the documentation of the  method for more details and options.


 * — Transclude the requested page
 * — Transclude the lead section of the requested page
 * — Transclude the requested section, excluding subsections
 * — Transclude the requested section, including subsections
 * — Transclude the first file of the page
 * — Transclude the second table of the requested section
 * — Transclude only the paragraphs of the lead section, link the bold text and remove the references