<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://pool.calebcooper.ie/index.php?action=history&amp;feed=atom&amp;title=Module%3ATranscluder%2Fdoc</id>
	<title>Module:Transcluder/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://pool.calebcooper.ie/index.php?action=history&amp;feed=atom&amp;title=Module%3ATranscluder%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://pool.calebcooper.ie/index.php?title=Module:Transcluder/doc&amp;action=history"/>
	<updated>2026-04-08T17:36:48Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://pool.calebcooper.ie/index.php?title=Module:Transcluder/doc&amp;diff=12687&amp;oldid=prev</id>
		<title>Caleb Cooper: Created page with &quot; Module:Transcluder/doc {{Module rating|beta}}    This module is a general-purpose &#039;&#039;&#039;transclusion engine&#039;&#039;&#039;, able to transclude any part of any page and with many options tha...&quot;</title>
		<link rel="alternate" type="text/html" href="https://pool.calebcooper.ie/index.php?title=Module:Transcluder/doc&amp;diff=12687&amp;oldid=prev"/>
		<updated>2020-10-20T09:51:08Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot; Module:Transcluder/doc {{Module rating|beta}}    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 tha...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
Module:Transcluder/doc&lt;br /&gt;
{{Module rating|beta}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&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;
&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Modules ===&lt;br /&gt;
&lt;br /&gt;
&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;
&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;
&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;
&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 &amp;lt;nowiki&amp;gt;&amp;lt;section&amp;gt;&amp;lt;/nowiki&amp;gt; tag (includes any subsections)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;noinclude&amp;gt;&amp;lt;/nowiki&amp;gt; and &amp;lt;nowiki&amp;gt;&amp;lt;onlyinclude&amp;gt;&amp;lt;/nowiki&amp;gt; tags are handled [[mw: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;
&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;
&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;
&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;
&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;
&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;
&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;
&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;
&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;
&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;
&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;
&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;
&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;
&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;
&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;
&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;
&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;
&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 [[mw:Extension:Scribunto/Lua reference manual#Patterns|Lua patterns]])&lt;br /&gt;
&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;
&lt;br /&gt;
&lt;br /&gt;
The very same syntax can be used to exclude many other elements:&lt;br /&gt;
&lt;br /&gt;
&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;
&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;
&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;
&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;
&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;
&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;
&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;
&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;
&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;
&lt;br /&gt;
&lt;br /&gt;
Options can be combined at will. For example:&lt;br /&gt;
&lt;br /&gt;
&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;
&lt;br /&gt;
&lt;br /&gt;
You can also get only some elements like so:&lt;br /&gt;
&lt;br /&gt;
&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;
&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;
&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;
&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;
&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;
&lt;br /&gt;
* &amp;lt;code&amp;gt;get( &amp;#039;Title#Section&amp;#039;, { only = &amp;#039;files, lists&amp;#039;, files = 1 } )&amp;lt;/code&amp;gt; — Get only the first, followed by all the lists&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The output can be further modified with a few special options:&lt;br /&gt;
&lt;br /&gt;
&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;
&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;
&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;
&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;
&lt;br /&gt;
* &amp;lt;code&amp;gt;get( &amp;#039;Title#Section&amp;#039;, { noBehaviorSwitches = true } )&amp;lt;/code&amp;gt; — Remove [[mw: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;
&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;
&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. This allows other modules to combine elements in more advanced ways.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Templates ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The main entry point for templates is the &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt; method. 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. 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;
&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;
&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;
&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; — Get the requested section or &amp;lt;nowiki&amp;gt;&amp;lt;section&amp;gt;&amp;lt;/nowiki&amp;gt; tag (includes any subsections)&lt;br /&gt;
&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;
&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;
&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;
&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;
&lt;br /&gt;
&lt;br /&gt;
Navigation menu&lt;br /&gt;
Calebgcooper&lt;br /&gt;
Alerts (0)&lt;br /&gt;
Notices (4)&lt;br /&gt;
TalkSandboxPreferencesBetaWatchlistContributionsLog out&lt;br /&gt;
ModuleTalk&lt;br /&gt;
ReadEdit sourceView historyWatchMore&lt;br /&gt;
Search&lt;br /&gt;
Search Wikipedia&lt;br /&gt;
Main page&lt;br /&gt;
Contents&lt;br /&gt;
Current events&lt;br /&gt;
Random article&lt;br /&gt;
About Wikipedia&lt;br /&gt;
Contact us&lt;br /&gt;
Donate&lt;br /&gt;
Contribute&lt;br /&gt;
Help&lt;br /&gt;
Learn to edit&lt;br /&gt;
Community portal&lt;br /&gt;
Recent changes&lt;br /&gt;
Upload file&lt;br /&gt;
Tools&lt;br /&gt;
What links here&lt;br /&gt;
Related changes&lt;br /&gt;
Special pages&lt;br /&gt;
Page information&lt;br /&gt;
&lt;br /&gt;
Languages&lt;br /&gt;
This page was last edited on 3 October 2020, at 18:15.&lt;br /&gt;
Privacy policyAbout WikipediaDisclaimersContact WikipediaMobile viewDevelopersStatisticsCookie statementWikimedia FoundationPowered by MediaWiki&lt;/div&gt;</summary>
		<author><name>Caleb Cooper</name></author>
	</entry>
</feed>