Help:A quick guide to templates: Difference between revisions

Content deleted Content added
top: H:TQG
m FAQ: bold markup preferred
Line 35:
 
==FAQ==
;'''How can I find out how to use an existing template? '''
: To see the documentation for the template whose name is "foo", go to "Template:foo".
 
;Can I use a template in more than one project? : No, if you want to use it on two different language Wikipedias, for example, you would need to create it twice.
; '''Can I use a template withinin amore template?than :one Yes.project?'''
; Are templates case-sensitive? : Yes, except usually the first letter.
;Can I use a template in more than one project? : No, if you want to use it on two different language Wikipedias, for example, you would need to create it twice.
; How can I add parameters? : See [[Help:Template]] for instructions.
 
; I edited the template, so why didn't the page it is used on change? : Wikipedia and your computer both store webpage ''[[Web cache|caches]]'' – or saved copies – and don't always show you an updated page. First, try to [[WP:BYPASS|bypass your browser's cache]] by pressing ⌘R, Ctrl+R, or F5. If that fails, you may need to [[WP:PURGE|purge]] the page's cache (which can be done several different ways). Perhaps the easiest way to do this is by clicking '''edit''' on the page in which the template appears, and then clicking on '''Save page''' without having changed anything – there is no need to fill in the ''Summary'' field since there will not be any ''history'' of this as a change generated.
'''Are templates case-sensitive?'''
; Can I move a template to a new name? : Yes, this works in exactly the same way as normal [[Help:Moving a page|page moves]]. When a page called for inclusion is a redirect page, the redirect target is included instead.
; Are templates case-sensitive? : Yes, except usually the first letter.
; Can I use a template within a template? : Yes.
 
;How do I add a new template?: You start a new template in the same way you would start a normal page. The only difference is that its title must start with {{code|Template:}}. Don't forget to document it so that other editors can use it!
'''How can I add parameters?'''
; Where is the manual for the programming language used to write templates?: The language inside templates is the same language as regular wiki markup, but template writers tend to use the more complex available functions such as #if: statements. See Wikipedia's [[Help:Template]] and Wikimedia's [[mw:Help:Template]], including all of "advanced functioning" help pages listed toward the bottom of [[mw:Help:Template#Links to other help pages|that page]].
; How can I add parameters? : See [[Help:Template]] for instructions.
 
'''I edited the template, so why didn't the page it is used on change? '''
; I edited the template, so why didn't the page it is used on change? : Wikipedia and your computer both store webpage ''[[Web cache|caches]]'' – or saved copies – and don't always show you an updated page. First, try to [[WP:BYPASS|bypass your browser's cache]] by pressing ⌘R, Ctrl+R, or F5. If that fails, you may need to [[WP:PURGE|purge]] the page's cache (which can be done several different ways). Perhaps the easiest way to do this is by clicking '''edit''' on the page in which the template appears, and then clicking on '''Save page''' without having changed anything – there is no need to fill in the ''Summary'' field since there will not be any ''history'' of this as a change generated.
 
'''Can I move a template to a new name?'''
; Can I move a template to a new name? : Yes, this works in exactly the same way as normal [[Help:Moving a page|page moves]]. When a page called for inclusion is a redirect page, the redirect target is included instead.
 
'''Can I use a template within a template?'''
: Yes.
 
'''How do I add a new template?'''
;How do I add a new template?: You start a new template in the same way you would start a normal page. The only difference is that its title must start with {{code|Template:}}. Don't forget to document it so that other editors can use it!
 
'''Where is the manual for the programming language used to write templates?'''
; Where is the manual for the programming language used to write templates?: The language inside templates is the same language as regular wiki markup, but template writers tend to use the more complex available functions such as #if: statements. See Wikipedia's [[Help:Template]] and Wikimedia's [[mw:Help:Template]], including all of "advanced functioning" help pages listed toward the bottom of [[mw:Help:Template#Links to other help pages|that page]].
 
==Examples==