Difference between revisions of "Help:Transclusion"

From EncyclopAtys

Jump to: navigation, search
(Created page with "<noinclude>{{Trad |DE= |EN=Help:Transclusion |ES= |FR=Aide:Transclusion |RU= }} </noinclude> Transclusion is generally the inclusion of the content of a document into another...")
 
m
 
(9 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
<noinclude>{{Trad
 
<noinclude>{{Trad
|DE=
+
|DE=Hilfe:Transklusion
 
|EN=Help:Transclusion
 
|EN=Help:Transclusion
 
|ES=
 
|ES=
Line 8: Line 8:
 
Transclusion is generally the inclusion of the content of a document into another document by reference.
 
Transclusion is generally the inclusion of the content of a document into another document by reference.
  
 +
==Transclusion==
 +
Source https://www.mediawiki.org/wiki/Transclusion
  
'''See https://www.mediawiki.org/wiki/Transclusion'''
+
The syntax is <nowiki>{{Namespace:Pagename}}</nowiki>. In short, some transclusion examples: If the source is in
== Partial transclusion tags ==
+
* Template ns (for ex "Template:Welcome"): use <nowiki>{{Welcome}}</nowiki>
More about <nowiki><noinclude></nowiki>, <nowiki><onlyinclude></nowiki> and <nowiki><includeonly></nowiki>: see https://www.mediawiki.org/wiki/Transclusion#Partial_transclusion
+
* Main ns (for ex "Lore"): <nowiki>{{:Lore}}</nowiki>
 +
* Other ns (for ex:  User:Example):  <nowiki>{{User:Example}}</nowiki>
 +
* If source is a subpage of the target (for ex « Transclusion/ja ») you can use subpage name, without the ns: <nowiki>{{/ja}}</nowiki>  
  
==Specialpages==
+
 
 +
=== Partial transclusion tags ===
 +
What will transclude from a page can be controlled with the tags <nowiki><noinclude></nowiki>, <nowiki><onlyinclude></nowiki> and <nowiki><includeonly></nowiki> placed in the source page wikitext.
 +
 
 +
{| class="wikitable"
 +
|-
 +
!wiki code !! What is rendered here (source page) !! What is transcluded there (destination page)
 +
|-
 +
| <nowiki><noinclude>text1</noinclude></nowiki> text2  || text1 text2 || text2
 +
|-
 +
| <nowiki><onlyinclude>text1</onlyinclude></nowiki> text2  || text1 text2 || text1
 +
|-
 +
| <nowiki><includeonly>text1</includeonly></nowiki> text2 || text2 || text1 text2
 +
|}
 +
 
 +
More on https://www.mediawiki.org/wiki/Transclusion#Partial_transclusion
 +
 
 +
===Specialpages===
 
<nowiki>{{Special:RecentChanges|namespace=10|limit=5}}</nowiki>, produce: {{Special:RecentChanges|namespace=10|limit=5}}.
 
<nowiki>{{Special:RecentChanges|namespace=10|limit=5}}</nowiki>, produce: {{Special:RecentChanges|namespace=10|limit=5}}.
  
Line 21: Line 42:
 
To include wiki pages in game, see Templates under [[:Category:IGtemplate|Category:IGtemplate]]: all between <nowiki>{{IGend}} and {{IGstart}}</nowiki> will be displayed in game.
 
To include wiki pages in game, see Templates under [[:Category:IGtemplate|Category:IGtemplate]]: all between <nowiki>{{IGend}} and {{IGstart}}</nowiki> will be displayed in game.
  
 +
== Notes and links ==
 +
* Source: https://www.mediawiki.org/wiki/Transclusion/
 +
* https://en.wikipedia.org/wiki/Wikipedia:Transclusion
 +
* On URL parameters  https://www.mediawiki.org/wiki/Manual:Parameters_to_index.php
 +
 +
* On ns (namespaces) : [[Wiki Technical Guide/EN ns list]], [[:fr:Guide Technique du wiki/FR ns liste]]
  
 
[[category:Help]]
 
[[category:Help]]

Latest revision as of 23:47, 30 November 2021

de:Hilfe:Transklusion
en:Help:Transclusion
fr:Aide:Transclusion
 
UnderConstruction.png
Translation to review
Don't blame the contributors, but come and help them 😎

Reference text ( Maintained text, used as reference ) :
Notes: (Leda, 2021-11-30)

Transclusion is generally the inclusion of the content of a document into another document by reference.

Transclusion

Source https://www.mediawiki.org/wiki/Transclusion

The syntax is {{Namespace:Pagename}}. In short, some transclusion examples: If the source is in

  • Template ns (for ex "Template:Welcome"): use {{Welcome}}
  • Main ns (for ex "Lore"): {{:Lore}}
  • Other ns (for ex: User:Example): {{User:Example}}
  • If source is a subpage of the target (for ex « Transclusion/ja ») you can use subpage name, without the ns: {{/ja}}


Partial transclusion tags

What will transclude from a page can be controlled with the tags <noinclude>, <onlyinclude> and <includeonly> placed in the source page wikitext.

wiki code What is rendered here (source page) What is transcluded there (destination page)
<noinclude>text1</noinclude> text2 text1 text2 text2
<onlyinclude>text1</onlyinclude> text2 text1 text2 text1
<includeonly>text1</includeonly> text2 text2 text1 text2

More on https://www.mediawiki.org/wiki/Transclusion#Partial_transclusion

Specialpages

{{Special:RecentChanges|namespace=10|limit=5}}, produce:
No changes during the given period match these criteria.
.

It does not work with FR/DE/... wikis (gives a 301 nginx error).

In game

To include wiki pages in game, see Templates under Category:IGtemplate: all between {{IGend}} and {{IGstart}} will be displayed in game.

Notes and links