Help:Templates

From MeritBadgeDotOrg

(Difference between revisions)
Jump to: navigation, search
(Revised draft)
(re-draft)
Line 43: Line 43:
The Shortcut template ''also'' contains the following:
The Shortcut template ''also'' contains the following:
-
&lt;<includeonly>[[Category:Shortcuts|{{PAGENAME}}]]</includeonly>
+
&lt;<nowiki><includeonly>[[Category:Shortcuts|{{PAGENAME}}]]</includeonly></nowiki>
 +
 
 +
This will add all shortcuts (that reference the Shortcut template) to the Shortcut category.
If you are interested in helping out with or colaborating on Shortcuts, please do so on the [[Help_talk:Shortcuts]] page.
If you are interested in helping out with or colaborating on Shortcuts, please do so on the [[Help_talk:Shortcuts]] page.

Revision as of 06:18, April 13, 2007

Contents

An introduction to templates

In MediaWiki, a template is a page which can be inserted into another page via a process called transclusion. Except where otherwise specified herein, (in bold text), the following resources should be referenced for guidance in creating templates on MeritBadgeDotOrg:

The template namespace is the namespace with prefix "Template:". A page in this namespace is called a template. The contents of such a page is designed to be useful for insertion in other pages (transclusion, creating a compound document).

All templates must reside in the Template namespace. Personal user templates must reside in

Usage

Templates are useful for any text for which one wants a copy in two or more pages, and there is no need for each copy to be edited independently to adapt it to the page it is in. Since parameters can be used, versions may to that extent even be different, and parameter values can be edited independently for each. Templates are not only convenient, but they can also "force" a useful uniformity.

Ambiguity of a reference to "this page"

If a page is included in another page, a reference to "this page" on the included page is ambiguous. Use noinclude or includeonly tags depending on what is meant. Alternatively, mention the page name explicitly, without using {{PAGENAME}}.

Prefixing templates from "external" wikia

Templates on the central Wikia work in the separate Wikia projects, provided that the prefix "wikia:" is used, see shared templates on wikia. (Please note that these external Wikia projects are NOT hosted and managed by the Wikimedia Foundation.) --Please do not attempt this! Templates running on MeritBadgeDotOrg must reside on MeritBadgeDotOrg.

Transclusitons in templates

Transclusion across projects, hence changing contents from a central place, is only possible:

  • for content in the form of an image on Commons, to any page,
  • for editable content on an image page on Commons, including content transcluded from other pages on Commons, to the corresponding local image pages, if there is no local image with the same name. --Porting images from WikiCommons into templates on MeritBadgeDotOrg is perfectly fine.

Template Talk

The talk page of a composition page is used to talk about the composition and the page in general, and could in addition be a composite page of the talk pages of the component pages.

Noinclude and includeonly

  • Anything between <noinclude> and </noinclude> will be processed and displayed only when the page is being viewed directly; it will not be included or substituted. *The converse is <includeonly>. Text between <includeonly> and </includeonly> will be processed and displayed only when the page is being included.

Tagging templates

For the time being, all templates on MeritBadgeDotOrg should include the following tag (preferably, at the bottom of the template):

<<noinclude>[[Category:Templates|{{PAGENAME}}]]</noinclude>

This will add all templates to the template category.

If you are interested in helping out with or colaborating on Templates, please do so on the Help_talk:Templates page.

Tagging Shortcuts

The Shortcut template also contains the following:

<<includeonly>[[Category:Shortcuts|{{PAGENAME}}]]</includeonly>

This will add all shortcuts (that reference the Shortcut template) to the Shortcut category.

If you are interested in helping out with or colaborating on Shortcuts, please do so on the Help_talk:Shortcuts page.

See also

Personal tools
language
http://www.meritbadge.org/wiki/index.php?title=Help:Templates&diff=1422&oldid=1421
www.meritbadge.org
crawl=CC-MAIN-2018-09
22079
application/http; msgtype=response
sha1:VOZQCNVSQRSLUGKK3TEV56RKE3XVHY46
<urn:uuid:3c700126-a3dd-4cb4-b507-73f2595ca114>
2018-02-23T20:34:21Z
104.28.24.35
application/xhtml+xml
sha1:OJAGSNMZMVXMAL2XSG4ZSKFZY5WPIIPU
<urn:uuid:02e29904-aef1-4103-8f76-704468d88040>
http://www.meritbadge.org/wiki/index.php?title=Help:Templates&diff=1422&oldid=1421
length
response
<urn:uuid:0eb3edec-8b67-4c8b-867f-79ba817faea5>
robots: classic
hostname: ip-10-102-148-6.ec2.internal
software: Nutch 1.6 (CC)
isPartOf: CC-MAIN-2018-09
operator: Common Crawl Admin
description: Wide crawl of the web for February 2018
publisher: Common Crawl
format: WARC File Format 1.0
conformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf