Module:Transcluder/doc: Difference between revisions

From Caves of Qud Wiki
Jump to navigation Jump to search
(Created page with "Copied from MediaWiki's [https://www.mediawiki.org/wiki/Special:MyLanguage/Module:Transcluder Transcluder]<includeonly>Category:Modules</includeonly>")
 
No edit summary
 
Line 1: Line 1:
Copied from MediaWiki's [https://www.mediawiki.org/wiki/Special:MyLanguage/Module:Transcluder Transcluder]<includeonly>[[Category:Modules]]</includeonly>
Copied from MediaWiki's [https://www.mediawiki.org/wiki/Special:MyLanguage/Module:Transcluder Transcluder]<includeonly>[[Category:Modules]]</includeonly>
{{Doc/start}}
This module is a general-purpose '''transclusion engine''', able to transclude any part of any page and with many options that normal transclusion doesn't provide.
=== Templates ===
The main entry point for templates is the <code>main</code>
It's essentially a wrapper of the <code>get</code> method to make it usable for templates.
See the documentation of the <code>get</code> method for more details and options.
Transclude the requested page
* <code><nowiki>{{#invoke:Transcluder|main|Title#}}</nowiki></code> —  Transclude the lead section of the requested page</translate>
* <code><nowiki>{{#invoke:Transcluder|main|Title#Section}}</nowiki></code> —  Transclude the requested section or <code><nowiki><section></nowiki></code> tag (includes any subsections)</translate>
* <code><nowiki>{{#invoke:Transcluder|main|Title#Section|sections=0}}</nowiki></code> —  Transclude the requested section, excluding subsections</translate>
* <code><nowiki>{{#invoke:Transcluder|main|Title|only=files|files=1}}</nowiki></code> —  Transclude only the first file of the page</translate>
* <code><nowiki>{{#invoke:Transcluder|main|Title#Section|only=tables|tables=2}}</nowiki></code> —  Transclude only the second table of the requested section</translate>
* <code><nowiki>{{#invoke:Transcluder|main|Title#|only=paragraphs|linkBold=yes}}</nowiki></code> —  Transclude only the paragraphs of the lead section and link the bold text</translate>
{{Doc/end}}

Latest revision as of 20:39, 17 August 2020

Copied from MediaWiki's Transcluder

Template-info.png Documentation

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

Templates

The main entry point for templates is the main It's essentially a wrapper of the get method to make it usable for templates.

See the documentation of the get method for more details and options.

Transclude the requested page

  • {{#invoke:Transcluder|main|Title#}} — Transclude the lead section of the requested page</translate>
  • {{#invoke:Transcluder|main|Title#Section}} — Transclude the requested section or <section> tag (includes any subsections)</translate>
  • {{#invoke:Transcluder|main|Title#Section|sections=0}} — Transclude the requested section, excluding subsections</translate>
  • {{#invoke:Transcluder|main|Title|only=files|files=1}} — Transclude only the first file of the page</translate>
  • {{#invoke:Transcluder|main|Title#Section|only=tables|tables=2}} — Transclude only the second table of the requested section</translate>
  • {{#invoke:Transcluder|main|Title#|only=paragraphs|linkBold=yes}} — Transclude only the paragraphs of the lead section and link the bold text</translate>