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 lead section of the requested page (all content before the first section), respecting, and tags.
 * — Return the wikitext of the lead section of the requested section (all content before the first subsection)

The  method accepts an optional second parameter that provides several options to modify the output.


 * — 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 from a lead section or section:


 * — 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 only, linking the bold text and then removing it as well as 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