Difference between revisions of "Template:Transclude"

From Sugar Labs
Jump to navigation Jump to search
m (moved Template:Transcluded to Template:Transclude: better match to use)
Line 1: Line 1:
<noinclude>The purpose of this template is to reveal sections of pages that come from transcluded pages. Pages tagged with this will be included in the [[:Category:Page with transclusion]] and will display the contents of the page in a lightyellow color as a reminder for the whole (just in case there are links to subsections that fail to make the warning visible.
+
<div style="border:1px solid orange; margin:0px; padding-left:6px; padding-right:6px; background-color:lightyellow;">
 +
<small>{{{note|'''Note:''' The contents of this section have been transcluded from [[{{{1}}}|another page]]:}}}</small><br>
 +
{{#if: {{{olpc|}}}|<span class="plainlinks">[http://wiki.laptop.org/go/The_OLPC_Wiki http://wiki.laptop.org/skins/common/images/OLPC_wiki_logo.png]</span>|}}<h1>[[{{{1}}}]]</h1>{{:{{{1}}}}}</div><includeonly>[[Category:Page with transclusion]]</includeonly><noinclude>
 +
[[Category:Template]]
  
The template takes an extra (optional) parameter that can be any text and will be displayed before the transclusion.
+
The purpose of this template is to reveal those sections of pages that come from transcluded pages.  Pages using this template will be included in the [[:Category:Page with transclusion]] and will display the contents of the transcluded page in a lightyellow color as a reminder of its off-page source.
  
 +
==Usage==
 +
The template takes two optional parameters
 +
# '''note'''
 +
#* Can be any text, which will be displayed before the transclusion in place of the default: '''Note:''' The contents of this section have been transcluded from <nowiki>[[{{{1}}}|another page]]:</nowiki>
 +
# '''olpc'''
 +
#* any non-whitespace text, used with <nowiki>{{#if:</nowiki> parser function to bring in the OLPC Wiki image ahead of the transclusion. Default: (empty string).
 +
 +
Example syntax:
 
<pre>
 
<pre>
{{Transcluded|the transcluded wiki page|optional text}}
+
{{Transclude|the transcluded wiki page|note=optional introductory text|olpc=1}}
 
</pre>
 
</pre>
  
[[Category:Template]]</noinclude><includeonly>[[Category:Page with transclusion]]</includeonly><div style="border-top:1px solid orange; border-bottom:1px solid orange; margin:0px; background-color:lightyellow;"><small>{{{2|'''Note:''' The contents of this section have been transcluded from [[{{{1}}}|another page]]:}}}</small>
+
The example wiki text below produces this transclusion:
{{:{{{1}}}}}</div>
+
<nowiki>{{Transclude|olpc:Community Jabber Servers|olpc=1}}</nowiki>
 +
{{Transclude|olpc:Community Jabber Servers|olpc=1}}
 +
</noinclude>

Revision as of 17:05, 14 November 2009

Note: The contents of this section have been transcluded from [[{{{1}}}|another page]]:

[[{{{1}}}]]

{{:{{{1}}}}}

The purpose of this template is to reveal those sections of pages that come from transcluded pages. Pages using this template will be included in the Category:Page with transclusion and will display the contents of the transcluded page in a lightyellow color as a reminder of its off-page source.

Usage

The template takes two optional parameters

  1. note
    • Can be any text, which will be displayed before the transclusion in place of the default: Note: The contents of this section have been transcluded from [[{{{1}}}|another page]]:
  2. olpc
    • any non-whitespace text, used with {{#if: parser function to bring in the OLPC Wiki image ahead of the transclusion. Default: (empty string).

Example syntax:

{{Transclude|the transcluded wiki page|note=optional introductory text|olpc=1}}

The example wiki text below produces this transclusion:

{{Transclude|olpc:Community Jabber Servers|olpc=1}}

Note: The contents of this section have been transcluded from another page:

OLPC_wiki_logo.png

olpc:Community Jabber Servers

301 Moved Permanently

Moved Permanently

The document has moved here.


Apache/2.4.58 (Ubuntu) Server at wiki.laptop.org Port 80