Rules/Templates: Difference between revisions

From MozillaZine Knowledge Base
Jump to navigationJump to search
m (correcting my last bad edit)
(Other templates, taken from Talk page, in no particular order)
Line 1: Line 1:
{{org}}
{{org}}
It's a good idea to keep Knowledge Base content uniform. We try to do that by making a list of [[In-House Style|style rules]] each contributor should follow. Another thing that helps keep the Knowledge Base uniform is templates (read [http://meta.wikimedia.org/wiki/Help:Template metawiki help]; [http://meta.wikimedia.org/wiki/Help:Category#A_category_tag_in_a_template.3B_caching_problem A category tag in a template; caching problem]).
It's a good idea to keep Knowledge Base content uniform. We try to do that by following the [[article naming conventions]] and [[In-House Style|style guidelines]] as much as possible. Another thing that helps is using '''templates''', which provide an easy way to add pre-defined content and (sometimes) formatting to articles.


This is work in progress. Discuss these conventions on the [[Talk:Rules/Templates|talk page]].
Discuss these conventions on the [[Talk:Rules/Templates|Talk page]].


=="Applies to" templates==
=="Applies to" templates==
Line 28: Line 28:
Usage: put <nowiki>{{org}}</nowiki> at the top of the page. Don't put on talk pages.
Usage: put <nowiki>{{org}}</nowiki> at the top of the page. Don't put on talk pages.


==Linking to application's category==
==Template for linking to an application's category==
You can use <code><nowiki>{{Application name}}</nowiki></code> to link to that application's category. For example: <code><nowiki>{{Firefox}}</nowiki></code> expands to <code><nowiki>[[:Category:Firefox|Firefox]]</nowiki></code> and looks like this: {{Firefox}}.
A shorthand way to link to an applications's category is to use <code><nowiki>{{Application name}}</nowiki></code>. For example: <code><nowiki>{{Firefox}}</nowiki></code> expands to <code><nowiki>[[:Category:Firefox|Firefox]]</nowiki></code> and looks like this: {{Firefox}}.


Implemented templates: [[Template:Firefox|<nowiki>{{Firefox}}</nowiki>]], [[Template:Thunderbird|<nowiki>{{Thunderbird}}</nowiki>]], [[Template:Mozilla Suite|<nowiki>{{Mozilla Suite}}</nowiki>]].
Implemented templates: [[Template:Firefox|<nowiki>{{Firefox}}</nowiki>]], [[Template:Thunderbird|<nowiki>{{Thunderbird}}</nowiki>]], [[Template:Mozilla Suite|<nowiki>{{Mozilla Suite}}</nowiki>]].
==Other useful templates==
Other useful templates include the following:
* '''[[Template:stub|stub]]''' &mdash; usage: <nowiki>{{stub}}</nowiki>
* '''[[Template:wrongtitle|wrongtitle]]''' &mdash; usage: <nowiki>{{wrongtitle|title=Good Page Name}}</nowiki>
* '''[[Template:cleanup|cleanup]]''' &mdash; usage: <nowiki>{{cleanup}}</nowiki>
* '''[[Template:merge|merge]]''' &mdash; usage: <nowiki>{{merge}} [[Better Article]]</nowiki>
* '''[[Template:mergefrom|mergefrom]]''' &mdash; usage: <nowiki>{{mergefrom}} [[Bad Article]]</nowiki>
* '''[[Template:noquestions|noquestions]]''' &mdash; usage: <nowiki>{{noquestions}}</nowiki>
* '''[[Template:appliesto|appliesto]]''' &mdash; usage: <nowiki>{{appliesto|AppName|CatNameMinusAppNameSuffix}}</nowiki> e.g. <nowiki>{{appliesto|Firefox|Issues}}</nowiki>
* '''[[Template:update|update]]''' &mdash; usage: <nowiki>{{update}}</nowiki>
* '''[[Template:prettytable|prettytable]]''' &mdash; usage: see [[In-House Style]] or [[Cookies]] for an example
For a list of all templates (most of which are not used), see [http://kb.mozillazine.org/index.php?title=Special%3AAllpages&from=&namespace=10 Special pages - All pages - Templates].
==External links==
* [http://meta.wikimedia.org/wiki/Help:Template Template usage in MediaWiki]
* [http://meta.wikimedia.org/wiki/Help:Category#A_category_tag_in_a_template.3B_caching_problem A category tag in a template; caching problem] (section from above link)

Revision as of 16:00, 6 November 2005

It's a good idea to keep Knowledge Base content uniform. We try to do that by following the article naming conventions and style guidelines as much as possible. Another thing that helps is using templates, which provide an easy way to add pre-defined content and (sometimes) formatting to articles.

Discuss these conventions on the Talk page.

"Applies to" templates

Some concepts apply to more than one application. To simplify maintenance, editors sometimes create articles that apply to two or more apps. Such articles do not have an application name in their titles, so in order to make it clear what application(s) a given article applies to, editors should put a blurb like this in the beginning of the article:

This article applies to Firefox and Thunderbird.

You can achieve this (and also have your article partially categorized) by using a template. Due to technical limitations of WikiMedia, we actually have a few different templates, for different number of params each.

Usage: {{appliesto2|Application1|Application2|Subcategory}} becomes

: ''This article applies to {{Firefox}} and {{Thunderbird}}.''
[[Category:Subcategory (Application1)]] [[Category:Subcategory (Application2)]]

Remember to add additional categories manually.

"upto" template

Use the upto template to specify that given category is a subcategory of another category.

For example putting {{upto|Firefox}} on a category page means that that category in a subcategory of Category:Firefox. This template should be placed at the beginning of the category page.

If a subcategory has two parent categories, then use the upto2 template, for example {{upto2|Firefox|Thunderbird}}.

"org" template

Use org template to put a page in Category:MozillaZine Knowledge Base organization. It's a shortcut and we'll also be able to put some text on all organizational pages when/if we need this.

Usage: put {{org}} at the top of the page. Don't put on talk pages.

Template for linking to an application's category

A shorthand way to link to an applications's category is to use {{Application name}}. For example: {{Firefox}} expands to [[:Category:Firefox|Firefox]] and looks like this: Firefox.

Implemented templates: {{Firefox}}, {{Thunderbird}}, {{Mozilla Suite}}.

Other useful templates

Other useful templates include the following:

For a list of all templates (most of which are not used), see Special pages - All pages - Templates.

External links