<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://compusofia.com/w/index.php?action=history&amp;feed=atom&amp;title=Module%3ATranscluder%2Fdoc%2Fen</id>
	<title>Module:Transcluder/doc/en - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://compusofia.com/w/index.php?action=history&amp;feed=atom&amp;title=Module%3ATranscluder%2Fdoc%2Fen"/>
	<link rel="alternate" type="text/html" href="https://compusofia.com/w/index.php?title=Module:Transcluder/doc/en&amp;action=history"/>
	<updated>2026-04-25T16:39:36Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://compusofia.com/w/index.php?title=Module:Transcluder/doc/en&amp;diff=7779&amp;oldid=prev</id>
		<title>FuzzyBot: Updating to match new version of source page</title>
		<link rel="alternate" type="text/html" href="https://compusofia.com/w/index.php?title=Module:Transcluder/doc/en&amp;diff=7779&amp;oldid=prev"/>
		<updated>2026-04-17T09:36:13Z</updated>

		<summary type="html">&lt;p&gt;Updating to match new version of source page&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
{{#ifeq:{{SUBPAGENAME}}|doc||{{Documentation subpage}}}}&lt;br /&gt;
&amp;lt;languages /&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;{{#switch:&lt;br /&gt;
| =&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{languages|Module:Transcluder/doc}}&amp;lt;/includeonly&amp;gt;&lt;br /&gt;
This module is a general-purpose &amp;#039;&amp;#039;&amp;#039;transclusion engine&amp;#039;&amp;#039;&amp;#039;, able to transclude any part of any page and with many options that normal transclusion doesn&amp;#039;t provide.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Modules ===&lt;br /&gt;
&lt;br /&gt;
The main entry point for modules is the &amp;lt;code&amp;gt;get&amp;lt;/code&amp;gt; method.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;get( &amp;#039;Title&amp;#039; )&amp;lt;/code&amp;gt; – Get the requested page (exact same result as normal transclusion)&lt;br /&gt;
* &amp;lt;code&amp;gt;get( &amp;#039;Title#&amp;#039; )&amp;lt;/code&amp;gt; – Get the lead section of the requested page&lt;br /&gt;
* &amp;lt;code&amp;gt;get( &amp;#039;Title#Section&amp;#039; )&amp;lt;/code&amp;gt; – Get the requested section or {{tag|section|open}} tag (includes any subsections)&lt;br /&gt;
&lt;br /&gt;
{{tag|noinclude|open}} and {{tag|onlyinclude|open}} tags are handled [[Special:MyLanguage/Transclusion#Transclusion markup|the usual way]] and there&amp;#039;s also an optional second parameter to exclude various elements from the result:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;get( &amp;#039;Title#Section&amp;#039;, { files = 0 } )&amp;lt;/code&amp;gt; – Exclude all files&lt;br /&gt;
* &amp;lt;code&amp;gt;get( &amp;#039;Title#Section&amp;#039;, { files = 1 } )&amp;lt;/code&amp;gt; – Exclude all files except the first&lt;br /&gt;
* &amp;lt;code&amp;gt;get( &amp;#039;Title#Section&amp;#039;, { files = 2 } )&amp;lt;/code&amp;gt; – Exclude all files except the second&lt;br /&gt;
* &amp;lt;code&amp;gt;get( &amp;#039;Title#Section&amp;#039;, { files = &amp;#039;1,2&amp;#039; } )&amp;lt;/code&amp;gt; – Exclude all files except the first and second&lt;br /&gt;
* &amp;lt;code&amp;gt;get( &amp;#039;Title#Section&amp;#039;, { files = &amp;#039;1-3&amp;#039; } )&amp;lt;/code&amp;gt; – Exclude all files except the first, second and third&lt;br /&gt;
* &amp;lt;code&amp;gt;get( &amp;#039;Title#Section&amp;#039;, { files = &amp;#039;1,3-5&amp;#039; } )&amp;lt;/code&amp;gt; – Exclude all files except the first, third, fourth and fifth&lt;br /&gt;
* &amp;lt;code&amp;gt;get( &amp;#039;Title#Section&amp;#039;, { files = -2 } )&amp;lt;/code&amp;gt; – Exclude the second file&lt;br /&gt;
* &amp;lt;code&amp;gt;get( &amp;#039;Title#Section&amp;#039;, { files = &amp;#039;-2,3&amp;#039; } )&amp;lt;/code&amp;gt; – Exclude the second and third files&lt;br /&gt;
* &amp;lt;code&amp;gt;get( &amp;#039;Title#Section&amp;#039;, { files = &amp;#039;-1,3-5&amp;#039; } )&amp;lt;/code&amp;gt; – Exclude the first, third, fourth and fifth files&lt;br /&gt;
* &amp;lt;code&amp;gt;get( &amp;#039;Title#Section&amp;#039;, { files = &amp;#039;A.png&amp;#039; } )&amp;lt;/code&amp;gt; – Exclude all files except A.png&lt;br /&gt;
* &amp;lt;code&amp;gt;get( &amp;#039;Title#Section&amp;#039;, { files = &amp;#039;-A.png&amp;#039; } )&amp;lt;/code&amp;gt; – Exclude A.png&lt;br /&gt;
* &amp;lt;code&amp;gt;get( &amp;#039;Title#Section&amp;#039;, { files = &amp;#039;A.png, B.jpg, C.gif&amp;#039; } )&amp;lt;/code&amp;gt; – Exclude all files except A.png, B.jpg and C.gif&lt;br /&gt;
* &amp;lt;code&amp;gt;get( &amp;#039;Title#Section&amp;#039;, { files = &amp;#039;-A.png, B.jpg, C.gif&amp;#039; } )&amp;lt;/code&amp;gt; – Exclude A.png, B.jpg and C.gif&lt;br /&gt;
* &amp;lt;code&amp;gt;get( &amp;#039;Title#Section&amp;#039;, { files = { [1] = true, [3] = true } } )&amp;lt;/code&amp;gt; – Exclude all files except the first and third&lt;br /&gt;
* &amp;lt;code&amp;gt;get( &amp;#039;Title#Section&amp;#039;, { files = { [1] = false, [3] = false } } )&amp;lt;/code&amp;gt; – Exclude the first and third files&lt;br /&gt;
* &amp;lt;code&amp;gt;get( &amp;#039;Title#Section&amp;#039;, { files = { [&amp;#039;A.png&amp;#039;] = false, [&amp;#039;B.jpg&amp;#039;] = false } } )&amp;lt;/code&amp;gt; – Exclude A.png and B.jpg&lt;br /&gt;
* &amp;lt;code&amp;gt;get( &amp;#039;Title#Section&amp;#039;, { files = &amp;#039;.+%.png&amp;#039; } )&amp;lt;/code&amp;gt; – Exclude all files except PNG files (see [[Special:MyLanguage/Extension:Scribunto/Lua reference manual#Patterns|Lua patterns]])&lt;br /&gt;
* &amp;lt;code&amp;gt;get( &amp;#039;Title#Section&amp;#039;, { files = &amp;#039;-.+%.png&amp;#039; } )&amp;lt;/code&amp;gt; – Exclude all PNG files&lt;br /&gt;
&lt;br /&gt;
The very same syntax can be used to exclude many other elements:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;get( &amp;#039;Title#Section&amp;#039;, { sections = 0 } )&amp;lt;/code&amp;gt; – Exclude all subsections&lt;br /&gt;
* &amp;lt;code&amp;gt;get( &amp;#039;Title#Section&amp;#039;, { sections = &amp;#039;History, Causes&amp;#039; } )&amp;lt;/code&amp;gt; – Exclude all subsections except &amp;#039;History&amp;#039; and &amp;#039;Causes&amp;#039;&lt;br /&gt;
* &amp;lt;code&amp;gt;get( &amp;#039;Title#Section&amp;#039;, { lists = 1 } )&amp;lt;/code&amp;gt; – Exclude all lists except the first&lt;br /&gt;
* &amp;lt;code&amp;gt;get( &amp;#039;Title#Section&amp;#039;, { tables = &amp;#039;stats&amp;#039; } )&amp;lt;/code&amp;gt; – Exclude all tables except the one with id &amp;#039;stats&amp;#039;&lt;br /&gt;
* &amp;lt;code&amp;gt;get( &amp;#039;Title#Section&amp;#039;, { paragraphs = &amp;#039;1-3&amp;#039; } )&amp;lt;/code&amp;gt; – Exclude all paragraphs except the first, second and third&lt;br /&gt;
* &amp;lt;code&amp;gt;get( &amp;#039;Title#Section&amp;#039;, { references = 0 } )&amp;lt;/code&amp;gt; – Exclude all references&lt;br /&gt;
* &amp;lt;code&amp;gt;get( &amp;#039;Title#Section&amp;#039;, { categories = &amp;#039;0&amp;#039; } )&amp;lt;/code&amp;gt; – Exclude all categories&lt;br /&gt;
* &amp;lt;code&amp;gt;get( &amp;#039;Title#Section&amp;#039;, { templates = &amp;#039;-.+infobox&amp;#039; } )&amp;lt;/code&amp;gt; – Exclude infobox templates&lt;br /&gt;
* &amp;lt;code&amp;gt;get( &amp;#039;Title#Section&amp;#039;, { parameters = &amp;#039;image&amp;#039; } )&amp;lt;/code&amp;gt; – Exclude all parameters from all templates except the one named &amp;#039;image&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Options can be combined at will.&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;get( &amp;#039;Title#Section&amp;#039;, { sections = 0, files = 1, paragraphs = &amp;#039;1-3&amp;#039; } )&amp;lt;/code&amp;gt; – Exclude all subsections, all files except the first, and all paragraphs except the first three&lt;br /&gt;
&lt;br /&gt;
You can also get only some elements like so:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;get( &amp;#039;Title#Section&amp;#039;, { only = &amp;#039;files&amp;#039; } )&amp;lt;/code&amp;gt; – Get only the files&lt;br /&gt;
* &amp;lt;code&amp;gt;get( &amp;#039;Title#Section&amp;#039;, { only = &amp;#039;lists&amp;#039;, lists = 1 } )&amp;lt;/code&amp;gt; – Get only the first list&lt;br /&gt;
* &amp;lt;code&amp;gt;get( &amp;#039;Title#Section&amp;#039;, { only = &amp;#039;tables&amp;#039;, tables = &amp;#039;stats&amp;#039; } )&amp;lt;/code&amp;gt; – Get only the table with id &amp;#039;stats&amp;#039;&lt;br /&gt;
* &amp;lt;code&amp;gt;get( &amp;#039;Title#Section&amp;#039;, { only = &amp;#039;paragraphs&amp;#039;, paragraphs = &amp;#039;1,3-5&amp;#039; } )&amp;lt;/code&amp;gt; – Get only the first, third, fourth and fifth paragraph&lt;br /&gt;
* &amp;lt;code&amp;gt;get( &amp;#039;Title#Section&amp;#039;, { only = &amp;#039;templates&amp;#039;, templates = &amp;#039;Infobox&amp;#039; } )&amp;lt;/code&amp;gt; – Get only the infobox&lt;br /&gt;
* &amp;lt;code&amp;gt;get( &amp;#039;Title#Section&amp;#039;, { only = &amp;#039;parameters&amp;#039;, parameters = &amp;#039;abstract&amp;#039;, references = 0 } )&amp;lt;/code&amp;gt; – Get only the parameter called &amp;#039;abstract&amp;#039; and remove all the references from it&lt;br /&gt;
&lt;br /&gt;
The output can be further modified with a few special options:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;get( &amp;#039;Title#Section&amp;#039;, { noFollow = true } )&amp;lt;/code&amp;gt; – Don&amp;#039;t follow redirects&lt;br /&gt;
* &amp;lt;code&amp;gt;get( &amp;#039;Title#Section&amp;#039;, { linkBold = true } )&amp;lt;/code&amp;gt; – Link the bold title or synonym near the start of the text&lt;br /&gt;
* &amp;lt;code&amp;gt;get( &amp;#039;Title#Section&amp;#039;, { noBold = true } )&amp;lt;/code&amp;gt; – Remove bold text&lt;br /&gt;
* &amp;lt;code&amp;gt;get( &amp;#039;Title#Section&amp;#039;, { noComments = true } )&amp;lt;/code&amp;gt; – Remove comments&lt;br /&gt;
* &amp;lt;code&amp;gt;get( &amp;#039;Title#Section&amp;#039;, { noLinks = true } )&amp;lt;/code&amp;gt; – Remove all links&lt;br /&gt;
* &amp;lt;code&amp;gt;get( &amp;#039;Title#Section&amp;#039;, { noSelfLinks = true } )&amp;lt;/code&amp;gt; – Remove self links&lt;br /&gt;
* &amp;lt;code&amp;gt;get( &amp;#039;Title#Section&amp;#039;, { noNonFreeFiles = true } )&amp;lt;/code&amp;gt; – Remove non-free files (currently identified by having the words &amp;#039;non-free&amp;#039; in their local description or at Commons)&lt;br /&gt;
* &amp;lt;code&amp;gt;get( &amp;#039;Title#Section&amp;#039;, { noBehaviorSwitches = true } )&amp;lt;/code&amp;gt; – Remove [[Special:MyLanguage/Help:Magic words#Behavior switches|behavior switches]] such as &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;__NOTOC__&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;get( &amp;#039;Title#Section&amp;#039;, { fixReferences = true } )&amp;lt;/code&amp;gt; – Prefix reference names with &amp;#039;Title &amp;#039; to avoid name conflicts when transcluding and rescue references defined outside the requested section to avoid undefined reference errors&lt;br /&gt;
&lt;br /&gt;
Besides the &amp;lt;code&amp;gt;get&amp;lt;/code&amp;gt; method, the module exposes several other methods to get specific parts of the wikitext.&lt;br /&gt;
This allows other modules to combine elements in more advanced ways.&lt;br /&gt;
&lt;br /&gt;
=== Templates ===&lt;br /&gt;
The main entry point for templates is the &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt; method.&lt;br /&gt;
It&amp;#039;s essentially a wrapper of the &amp;lt;code&amp;gt;get&amp;lt;/code&amp;gt; method to make it usable for templates.&lt;br /&gt;
&lt;br /&gt;
See the documentation of the &amp;lt;code&amp;gt;get&amp;lt;/code&amp;gt; method for more details and options.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:Transcluder|main|Title}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; – Transclude the requested page&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:Transcluder|main|Title#}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; – Transclude the lead section of the requested page&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:Transcluder|main|Title#Section}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; – Transclude the requested section or {{tag|section|open}} tag (includes any subsections)&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:Transcluder|main|Title#Section|sections=0}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; – Transclude the requested section, excluding subsections&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:Transcluder|main|Title|only=files|files=1}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; – Transclude only the first file of the page&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:Transcluder|main|Title#Section|only=tables|tables=2}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; – Transclude only the second table of the requested section&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:Transcluder|main|Title#|only=paragraphs|linkBold=yes}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; – Transclude only the paragraphs of the lead section and link the bold text&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Module:Transcluder/testcases]]&lt;br /&gt;
* [[c:Data:i18n/Module:Transcluder.tab]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{Sandbox other||&lt;br /&gt;
&amp;lt;!-- Categories below this line; interwikis at Wikidata --&amp;gt;&lt;br /&gt;
[[Category:Modules]]&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Module documentation pages{{#translation:}}]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
| #default=&lt;br /&gt;
  {{#invoke:Template translation|renderTranslatedTemplate|template=Module:Transcluder/doc|noshift=1|uselang={{int:lang}}}}&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>FuzzyBot</name></author>
	</entry>
</feed>