8,756
edits
(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}} |