Difference between revisions of "User:Anonymax/Sandbox"

From CWCki
Jump to navigation Jump to search
(Testing)
(Template help? idk)
Line 1: Line 1:
==Hi there!==
== Templates ==
 
===What are they?===
[[Image:CWCiki_Introduction.jpg|thumb|300px|Welcome to CWCKI!]]
Templates are a simple way to insert content in to an article without having to use a lot of Wiki markup. They are most often used for complex things like navigation boxes at the foot of articles.
 
* Templates are stored in the Template namespace e.g. [[Template:Captain's Log]]
Welcome to [[CWCki]]! There's a lot to do around here because Chris never does anything himself. I hope you'll stay with us and make many improvements of your own!
* When a template is updated, the changes are rolled out everywhere the template is used
 
* They can make use of variables, to insert information in specified places in the template.
:Before you start, be sure to read '''[[A Quick Guide to CWCki]]'''. This will guide you through the dos and donts of editing [[CWCki|the world's most accurate wiki]]. Be especially sure to read this if you consider anonymous to be legion or if you've just come over from [[ED]]. Everything you know is [[lies|wrong]].
===How do I use one?===
 
Inserting a template in to an article varies according to the template being used.
:'''[[Special:Recentchanges|Recent changes]]''' is a great first stop, because you can see what other people are editing right this minute, and where you can help.
* For a simple template without any parameters, you use the code '''<nowiki>{{</nowiki>templatename}}'''
 
* If a template has named parameters, you use the code '''<nowiki>{{</nowiki>templatename |paramname=Some |paramname2=Content}}'''
:If you're looking for things to do, check out the '''[[CWCki:Priority Listing|priority listing]]''' for things that need to be done.
** Spaces are not needed between parameters, but can help make the template more readable to editors
 
** In the template code, named parameters appear as '''<nowiki>{{{</nowiki>varname}}}'''. Text you enter for that parameter will be inserted in its place.
:If you haven't already, create a '''[[User:{{PAGENAME}}|user page]]''' about yourself! If you do, we'll be able to know you better as a member of our community. Just don't upload gigantic pictures of yourself and your favorite anime. I warn against this only because it's happened before.
* If the template doesn't have named parameters, any text placed after a vertical pipe  '''|'''  is treated as a numbered parameter: '''<nowiki>{{</nowiki>templatename|Some|Content}}'''
 
** In the template code, numbered parameters appear as '''<nowiki>{{{</nowiki>1}}}'''. Each subsequent pipe adds a new numbered parameter.
:'''Questions?''' Please read the [[Frequently Asked Questions| FAQ]] first. Later, you can ask in the '''[[CWCki:Community_Portal|Community Portal]]''' or on the "discussion" page associated with each article, join the live chat in our [[Sonichu (IRC)|IRC channel]] or post a message on [[User talk:Anonymax|my talk page]]!
===Be careful with pipes===
 
Any vertical pipes placed within the template braces '''<nowiki> {{  }}</nowiki>''' will be interpreted as the start of a new parameter. If you need to insert a pipe as part of a parameter's content, use: '''{{tl|!}}'''
:Once again, welcome to CWCki!
 
<div style="clear:both;"></div>

Revision as of 09:52, 29 May 2010

Templates

What are they?

Templates are a simple way to insert content in to an article without having to use a lot of Wiki markup. They are most often used for complex things like navigation boxes at the foot of articles.

  • Templates are stored in the Template namespace e.g. Template:Captain's Log
  • When a template is updated, the changes are rolled out everywhere the template is used
  • They can make use of variables, to insert information in specified places in the template.

How do I use one?

Inserting a template in to an article varies according to the template being used.

  • For a simple template without any parameters, you use the code {{templatename}}
  • If a template has named parameters, you use the code {{templatename |paramname=Some |paramname2=Content}}
    • Spaces are not needed between parameters, but can help make the template more readable to editors
    • In the template code, named parameters appear as {{{varname}}}. Text you enter for that parameter will be inserted in its place.
  • If the template doesn't have named parameters, any text placed after a vertical pipe | is treated as a numbered parameter: {{templatename|Some|Content}}
    • In the template code, numbered parameters appear as {{{1}}}. Each subsequent pipe adds a new numbered parameter.

Be careful with pipes

Any vertical pipes placed within the template braces {{ }} will be interpreted as the start of a new parameter. If you need to insert a pipe as part of a parameter's content, use: {{!}} (Usage)