Help:A quick guide to templates: Difference between revisions
Content deleted Content added
Caleb Cooper (talk | contribs) No edit summary |
Caleb Cooper (talk | contribs) m Text replacement - "[[Help:Template" to "[[Wikipedia:Help:Template " |
||
| (2 intermediate revisions by the same user not shown) | |||
Line 26:
===Parameters===
Templates can have parameters which the page can dynamically incorporate into the transcluded page. Instead of just the template name, like <code><nowiki>{{foo}}</nowiki></code>, an embedded template tag would have additional values separated by [[vertical bar]]s (|), e.g. <code><nowiki>{{foo|July|lc=yes}}</nowiki></code>. Here <code>July</code> is the value of the first unnamed parameter; <code>yes</code> is the value of the named parameter <code>lc</code>. Writing the template page for a template with parameters is more complicated than for a template with no parameters. See [[Wikipedia:Help:
===Editing existing templates===
Line 51:
'''How can I add parameters?'''
: See [[Wikipedia:Help:
'''I edited the template, so why didn't the page it is used on change? '''
: Wikipedia and your computer both store webpage ''[[Wikipedia:Web cache|caches]]'' – or saved copies – and don't always show you an updated page. First, try to [[Wikipedia:WP:BYPASS|bypass your browser's cache]] by pressing ⌘R, Ctrl+R, or F5. If that fails, you may need to [[Wikipedia: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 '''Publish changes''' 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?'''
: Yes, this works in exactly the same way as normal [[Wikipedia: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?'''
Line 66:
'''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 [[Wikipedia:Help:Template]] and Wikimedia's [[
==
For more detail see wikipedia page [[wikipedia:Help:A quick guide to templates]]
| |||