Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Search
Search
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Help:Transclusion
(section)
Help page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Standard section transclusion=== Using <syntaxhighlight lang="wikitext" inline>{{#section-h:PAGENAME|SECTIONNAME}}</syntaxhighlight>, one can easily transclude the content within a section on one page to another by referring to the standard, ubiquitous headline-based section headers used throughout Wikipedia. To transclude the lead of an article with this method, one can use {{nowrap|<syntaxhighlight lang="wikitext" inline>{{#section-h:PAGENAME}}</syntaxhighlight>}}. This is simpler than the already widely used selective transclusion methods of the sections below, which require special source document markup. {{High priority|This selective transclusion method often adds a line break above and/or below the section transclusion, depending upon the source and target document markup; to avoid this issue, wrap the selective transclusion template in a {{tlx|trim}} template.}} In other words, use the following modifications to the transclusion code listed immediately above: * Code for transcluding a section in the body of an article: <syntaxhighlight lang="wikitext" inline>{{trim|{{#section-h:PAGENAME|SECTIONNAME}}}}</syntaxhighlight> * Code for transcluding the lead of an article: <syntaxhighlight lang="wikitext" inline>{{trim|{{#section-h:PAGENAME}}}}</syntaxhighlight> <!-- This warrants expansion (better formatting, examples), but I'm creating the section for now - to see what the initial feeback is. -Elvey)--> ====Transcluded section hatnote==== For the purpose of indicating where selectively transcluded article content is located, it is helpful to include a {{tlx|Transcluded section}} hatnote at the top of the corresponding section of the page being transcluded to; i.e., use either {{nowrap|<syntaxhighlight lang="wikitext" inline>{{transcluded section|source=PAGENAME}}</syntaxhighlight>}} or {{nowrap|<syntaxhighlight lang="wikitext" inline>{{transcluded section|source=PAGENAME|part=yes}}</syntaxhighlight>}}, depending upon whether the transcluded content is an entire section of the transcluding page. These templates render as follows: *{{nowrap|<syntaxhighlight lang="wikitext" inline>{{transcluded section|source=PAGENAME#SECTION}}</syntaxhighlight>}} renders as: {{transcluded section|source=PAGENAME#SECTION}} *{{nowrap|<syntaxhighlight lang="wikitext" inline>{{transcluded section|source=PAGENAME#SECTION|part=yes}}</syntaxhighlight>}} renders as: {{transcluded section|source=PAGENAME#SECTION|part=yes}} No such hatnote is needed at the section being transcluded {{em|from}}, since where else the content might appear is not of immediate interest to the reader. However, an HTML comment note between the heading and the transcluded content is probably pertinent so that editors are aware of the repurposing of the material and keep the broader audience in mind with changing the wording. Example: * <syntaxhighlight lang="wikitext" inline><!-- The content of this section is transcluded at PAGENAME2#SECTION and PAGENAME3#SECTION. --></syntaxhighlight>
Summary:
Please note that all contributions to Red Letter Media Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
RLMWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Toggle limited content width