Module:Transcluder/doc

This module is a transclusion engine, able to transclude any part of any page.

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 the reference names with 'Title ' to avoid name conflicts with the references of the transcluding page and rescue references defined elsewhere in the page to avoid undefined reference errors.
 * — Include subsections

It's also possible to get just the files, lists, tables or paragraphs:


 * — 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 in many ways:


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

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. Below are a few examples of usage, but see the documentation of the  method for details.


 * — Transclude the lead section of the requested page (everything before the first section)
 * — Transclude the lead section of the requested section (everything before the first subsection)
 * — Transclude only the files of the lead section
 * — Transclude only the second table of the requested section
 * — Transclude only the paragraphs of the lead section, linking the bold text and then removing it as well as the references