Difference between revisions of "Talk:GBAtemp Wiki Tutorial"
(thanks for the link) |
|||
Line 12: | Line 12: | ||
::Thank you for your answer, I'll read it. --[[User:Cyan|Cyan]] 14:14, 5 March 2007 (CET) | ::Thank you for your answer, I'll read it. --[[User:Cyan|Cyan]] 14:14, 5 March 2007 (CET) | ||
+ | |||
+ | :::The compatibility list is a bad example, simply because it is using custom extensions. Mythril is on the money though. Triple {} brackets means a user-specified parameter that will be passed to the template, and double {} brackets are what you use to call the template. An easy to understand example would be [http://wiki.gbatemp.net/index.php?title=0434_-_NEW_Super_Mario_Bros._%28U%29&action=edit this page]. It uses 3 simple templates (which have links at the bottom of the page). Parameters are not required to be numbered either, it just makes it easier when calling the template. For example they could be called {{hello this is a parameter}} or {{blah}}, but to call the template you'd have to insert something along the lines of: | ||
+ | {{template name|hello this is a parameter=what user sees for this parameter|blah=what user sees for this parameter}} | ||
+ | [http://www.mediawiki.org/wiki/Help:Templates This page] explains templates very nicely (and supersedes the link posted further up the page) [[User:Dirtie|Dirtie]] 11:10, 6 March 2007 (CET) |
Revision as of 10:10, 6 March 2007
Hi, maybe it's only for admin to use it, but I would like a tutorial on how to create and use a template. I know the {{template name}} thing, for simple template like {{List Ranges}} it's easy to understand and use.
But I don't know how it can change an article's data with complexe template. For exemple the NDS compatibility template {{Slot-1 Compatibility}} use {{{1}}}, {{{2}}}. Is that a mask for data written by a user, so if you change the template the data filled by a user is left as is ? What the subst: stand for ?
Maybe you are still testing it because I didn't see this template in the NDS compatibility list article.
--Cyan 13:22, 5 March 2007 (CET)
- The Wikimedia's help page about templates might be of help. But I guess having a short description in GBAtemp's wiki wouldn't hurt either.
- Anyway, {{{1}}} means the first parameter given to the template, {{{2}}} means the second parameter, etc. So if you call the template like this {{Template|parameter1|parameter2}}, {{{1}}} will be replaced with parameter1, and {{{2}}} is replaced with parameter2. Don't remember what subst: is though... --Mythril 13:54, 5 March 2007 (CET)
- Thank you for your answer, I'll read it. --Cyan 14:14, 5 March 2007 (CET)
- The compatibility list is a bad example, simply because it is using custom extensions. Mythril is on the money though. Triple {} brackets means a user-specified parameter that will be passed to the template, and double {} brackets are what you use to call the template. An easy to understand example would be this page. It uses 3 simple templates (which have links at the bottom of the page). Parameters are not required to be numbered either, it just makes it easier when calling the template. For example they could be called Template:Hello this is a parameter or Template:Blah, but to call the template you'd have to insert something along the lines of:
Template:Template name
This page explains templates very nicely (and supersedes the link posted further up the page) Dirtie 11:10, 6 March 2007 (CET)