Bulbapedia:Templates: Difference between revisions

(expansion to Testing section)
m (formatting)
 
(5 intermediate revisions by 4 users not shown)
Line 1: Line 1:
Reference page for template creation.
{{Policy}}
*General template help: [http://www.mediawiki.org/wiki/Help:Templates]
*Magic words: [http://www.mediawiki.org/wiki/Help:Magic_words Help] and [http://www.mediawiki.org/wiki/Manual:Magic_words Manual]
*Parser functions: [http://www.mediawiki.org/wiki/Help:Extension:ParserFunctions Help], [http://www.mediawiki.org/wiki/Extension:ParserFunctions Manual], and [http://www.mediawiki.org/wiki/Extension:Parser_function_extensions list].
*And of course, look at existing templates with the features you want. That's probably easiest, and the best starting location since they're more likely to conform to style guidelines.


==Testing templates==
==Testing templates==
While making a new template or a new revision of an existing template, it is often better to put it in a user subpage (make an article at User:<yourname>/<pagename>) until it is ready and approved. If creating a test page in your userspace, mind the {{bp|userspace policy}}.


While making a new template or a new revision of an existing template, it is often better to put it in a user subpage (make an article at User:<yourname>/<pagename>) until it is ready and approved. If creating a test page in your userspace, mind [[Bulbapedia:userspace policy]].
To test your subpage template creation with actual use, you can post it at the [[Bulbapedia:Sandbox|Bulbapedia Sandbox]], just by adding <nowiki>{{User:<yourname>/<pagename>|</nowiki>''test parameters''}} to the page. This will transclude your page as if it was a template, despite not being in the template namespace.


To test your subpage template creation with actual use, you can post it at [[Bulbapedia:Sandbox]], just by adding <nowiki>{{User:<yourname>/<pagename>|</nowiki>''test parameters''}} to the page. This will transclude your page as if it was a template, despite not being in the template namespace.
If a template was recently updated, but pages which use it do not update to reflect the change, the specific pages can be forced to update their transcluded pages by hard-refreshing the server. This can be done by clicking the UTC clock in the top of your screen.


If a template was recently updated, but pages which use it do not update to reflect the change, the specific pages can be forced to update their transcluded pages by performing "null edits" - clicking the "Edit this page" button and saving without making any changes. If this does not update the use of the template on the page, there is probably a bug in the template, and '''more null edits should not be performed'''.
And of course, look at existing templates with the features you want. That's probably easiest, and the best starting location since they're more likely to conform to style guidelines.
 
==External links==
*[http://www.mediawiki.org/wiki/Help:Templates General template help]
*Magic words ([http://www.mediawiki.org/wiki/Help:Magic_words help], [http://www.mediawiki.org/wiki/Manual:Magic_words manual])
*Parser functions ([http://www.mediawiki.org/wiki/Help:Extension:ParserFunctions help], [http://www.mediawiki.org/wiki/Extension:ParserFunctions manual], [http://www.mediawiki.org/wiki/Extension:Parser_function_extensions list])
 
{{-}}
{{Bulbapedia guidelines}}

Latest revision as of 16:53, 2 May 2015

Bulbapedia logo.png
This article is an official policy on Bulbapedia.

Its contents are strongly binding and can be considered law on Bulbapedia.

Testing templates

While making a new template or a new revision of an existing template, it is often better to put it in a user subpage (make an article at User:<yourname>/<pagename>) until it is ready and approved. If creating a test page in your userspace, mind the userspace policy.

To test your subpage template creation with actual use, you can post it at the Bulbapedia Sandbox, just by adding {{User:<yourname>/<pagename>|test parameters}} to the page. This will transclude your page as if it was a template, despite not being in the template namespace.

If a template was recently updated, but pages which use it do not update to reflect the change, the specific pages can be forced to update their transcluded pages by hard-refreshing the server. This can be done by clicking the UTC clock in the top of your screen.

And of course, look at existing templates with the features you want. That's probably easiest, and the best starting location since they're more likely to conform to style guidelines.

External links


Bulbapedia policies and guidelines
Manual of style AnimeGamesMangaSidegamesTCG
Help pages Dispute resolutionFAQList of link templatesWikicodeValues
Articles Manual of styleNotability requirementsSpeculation policyUnreleased materialsProtectionVandalism
Talk pages Code of conductSignature policyTalk page policy
Templates Link templatesList of link templatesTemplate policyUsertag policy
Userspace Username policyUserspace policyUsertag policy