Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Help:Template
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Problems and workarounds=== * The following techniques are helpful in debugging a template: ** Use [[Special:ExpandTemplates]] to see the full recursive expansion of one or more templates. ** Use <code>subst:</code> to substitute a template (rather than transclude it), which can show more clearly what is happening when the template is transcluded; see [[Help:Substitution]]. ** Use <code>msgnw:</code> (short for "'''m'''e'''s'''sa'''g'''e, '''n'''o'''w'''iki") to more-or-less transclude the source of the template rather than its expansion. It is not perfect: lists are rendered, comments are removed, and single newlines are replaced with spaces (which is particularly confounding when transcluding wikitext tables). * If the first character of a template expansion (or parser function result) is one of four wiki markup characters—<code>:</code>, <code>;</code>, <code>*</code>, <code>#</code>{{efn|These are defined in the [https://web.archive.org/web/20180625163321/https://doc.wikimedia.org/mediawiki-core/master/php/classParser.html#ad463888e40c078ac9bcfcaf1231e39d7 <code>doBlockLevels</code> function of Parser.php].}}, it is processed during display as though it were at the beginning of a line, even if the template call is not. This allows you to create various kinds of lists with templates where the template call may not be in the correct place for a list. To avoid this, use {{xtag|nowiki|s}} before the markup or {{tag|nowiki}} around it, or use the [[HTML]] entities <code>&#58;</code>, <code>&#59;</code>, <code>&#42;</code>, <code>&#35;</code>, or use the templates {{tl|colon}}, {{tl|;}}, {{tl|asterisk}}, {{tl|number sign}} (those templates may not exist at other wikis). In some cases, the HTML entities will work when the {{tag|nowiki|s}} does not. The problem often occurs when a parameter value in a template call starts with one of the four characters. See also {{tl|Encodefirst}}. * For issues with template substitution, such as how to control whether subtemplates are substituted as well when the parent template is substituted, see [[Help:Substitution]]. * You can use the template {{tlx|Trim}} to strip any initial or final whitespace from unnamed parameter values if this would cause problems; <em>named</em> parameter values are automatically stripped in this way. * To protect server resources and avoid infinite loops, the parser imposes certain limits on the depth of transclusion nesting and on the page size with expanded templates. This may cause a page to break if it uses very complex templates, particularly if there are multiple such templates on the same page. For more information, see [[WP:Template limits]]. You can check a page's overall load on the server by examining the generated HTML for a page and looking for the <code>NewPP limit report</code> comments. * Do not use <code>=</code> wikimarkup to create a section header in a template which is intended for use in article space; this will create an edit link on a page that transcludes the template that will confusingly open the <em>template</em> for editing. * You may avoid section edit links to the template by including <code><nowiki><includeonly>__NOEDITSECTION__</includeonly></nowiki></code>.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)