Difference between revisions of "Template:Category"

From SoftMC-Wiki
Jump to: navigation, search
m
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
'''{{FULLPAGENAME}}''' {{{description}}}
+
<includeonly>'''{{FULLPAGENAME}}''' {{{description}}}
{{#if: {{{frontpage}}}|
+
{{#if:{{{frontpage|}}}|:
The front page is '''{{{frontpage}}}'''}}
+
 
 +
The front page is '''{{{frontpage}}}'''
 +
|{{#ifexist:{{PAGENAME}}|:
 +
 
 +
The front page is '''[[{{PAGENAME}}]]'''
 +
}}
 +
}}</includeonly><!--
 +
 
 +
 
 +
### DESCRIPTION
 +
--><noinclude>
 +
{{Template
 +
|description=
 +
This template is used on common categories to provide a similarly looking short description and a link to the front page for the category.
 +
 
 +
|template=
 +
<nowiki>
 +
{{Category
 +
|description=
 +
|frontpage=
 +
}}
 +
</nowiki>
 +
 
 +
|parameters=
 +
;description
 +
: Text added after the category name
 +
;frontpage (optional)
 +
: Link to the front page for the category, if exists.
 +
 
 +
|operation=
 +
* If ''frontpage'' is empty and a page with the name of the category exists (page name after <code>Category:</code>), it is automatically linked as front page.
 +
 
 +
|examples=
 +
The following is used in the [[:Category:Help]] page:
 +
<pre>
 +
{{Category
 +
|description=
 +
contains help pages that describe how to use MediaWiki.
 +
Only pages in "Help:" namespace should be in this category.
 +
|frontpage=[[Help:Contents]]
 +
}}
 +
</pre>
 +
}}
 +
 
 +
[[Category:Templates]]
 +
</noinclude>

Latest revision as of 13:52, 1 December 2010

This template is used on common categories to provide a similarly looking short description and a link to the front page for the category.

Template

{{Category
|description=
|frontpage=
}}

Parameters

description
Text added after the category name
frontpage (optional)
Link to the front page for the category, if exists.

Operation

  • If frontpage is empty and a page with the name of the category exists (page name after Category:), it is automatically linked as front page.

Examples

The following is used in the Category:Help page:

{{Category
|description=
contains help pages that describe how to use MediaWiki.
Only pages in "Help:" namespace should be in this category.
|frontpage=[[Help:Contents]]
}}

For more examples refer to pages, which use this template: What links here.

Help:Templates describes general usage of templates, including treatment of special characters.