Help:Templates View history

m (Added template {{WikiHelp}})
m (→‎Overview: typo)
 
(2 intermediate revisions by the same user not shown)
Line 3: Line 3:
{{Construction|contact=http://www.waze.com/forum/ucp.php?i=pm&mode=compose&u=7009939|contacttype=user|open=no|section=no}}
{{Construction|contact=http://www.waze.com/forum/ucp.php?i=pm&mode=compose&u=7009939|contacttype=user|open=no|section=no}}


A template is a Wiki page built to be included in other pages and usually contain material intended to be included in many articles or pages throughout the Wiki.
== Overview ==
Templates are usually found in the template namespace. Their page names start with "Template:", such as "Template:red". To add the content of the template page into any other Wiki page, just add the code {{tlc|red}} without also including the namespace "Template:".
Although not normally recommended, if a non-Template namespace page must be used as a template, include the namespace like: {{tlc|help:editing}} (from the Help namespace) or {{tlc|<nowiki>:places</nowiki>}} from the Main namespace).


== Template namespace ==
== Template namespace ==
(Information to be added.)
{{hatnote|1 = For more information, see this [https://en.wikipedia.org/wiki/Wikipedia:Template_namespace Wikipedia Template namespace article].}}


== Learning about templates ==
== Learning about templates ==
(Information to be added.)
{{hatnote|1 = For more information, see this [https://en.wikipedia.org/wiki/Help:A_quick_guide_to_templates Wikipedia quick guide to templates].}}


== Transclusion overview ==
== Transclusion overview ==

Latest revision as of 07:27, 15 May 2017

This article covers information on the Waze Wiki itself, not the Waze application. If you reached this page in error, return to the Wiki search page to search again for your topic.


This new page is currently undergoing modifications. Content is being prepared by one or more users. Do not make any changes before you send a private message to this user.

A template is a Wiki page built to be included in other pages and usually contain material intended to be included in many articles or pages throughout the Wiki.

Overview

Templates are usually found in the template namespace. Their page names start with "Template:", such as "Template:red". To add the content of the template page into any other Wiki page, just add the code {{red}} without also including the namespace "Template:".

Although not normally recommended, if a non-Template namespace page must be used as a template, include the namespace like: {{help:editing}} (from the Help namespace) or {{:places}} from the Main namespace).

Template namespace

Learning about templates

Transclusion overview

(Information to be added.)

Documentation subpages

When creating any template, a documentation subpage should be part of the template. Place this code at the very end of the template. Because templates are generally transcluded into other pages, it is important not to add unnecessary line breaks. Therefore the initial <noinclude> should fall immediately after the last character of the template page, not on the next line below it.

<noinclude>

{{Documentation}}
</noinclude>

Once this page is initially added to a template, it will place an empty template documentation box and a red link to the documentation subpage indicating the doc subpage is not yet created. This initial link will automatically enter the template into the category indicating the template documentation is missing.

Once some or all the documentation is added, the category can be changed to reflect the appropriate documentation category if more edits are required, or removed completely since the documentation no longer needs attention.

Adding categories

When adding categories to pages, it is important to differentiate between adding a template to a category or adding the page on which a template is used to a category. In other words, a template that displays a box on a page saying the page is under construction should also add a category onto the page to include it in a category tracking pages under construction. Separately, the template itself should be placed in a category for tracking message templates. Where and how the category link is placed on the page will determine if the page or the template is marked and for what it is marked.

When templates are properly created with a documentation subpage, the category tracking the template itself is put on that document subpage. If a template was originally created without a document subpage, the category may be seen on the template page itself inside noinclude instructions. If that is the case, that code should be removed and the category should be moved to the documentation subpage.

<includeonly><!-- 

  These categories get added only to the template page 
  that transcludes this doc page
  -->
[[Category:Template Management]]
[[Category:Expand Template Documentation]]
</includeonly>