Help: Template 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! ===Hints and workarounds=== The following points may be worth noting when using templates: * Templates are not the only method of [[Help:Transclusion|transclusion]], in some cases, other methods such as [[WP:SELECTIVETRANSCLUSION|selective transclusion]] are more appropriate. * {{anchor|Equals}}An unnamed parameter value cannot contain an ordinary equals sign, as this would be interpreted in the parameter specification as a named parameter (with the equals sign separating the name from its value).{{efn|This does not apply if the equals sign comes within another template call or other item which the parser handles separately.}} To specify an unnamed parameter including an equals sign (for example in a [[URL]] with [[name–value pair]]s), replace the equals sign with the [[mw:Help:Magic words#Other|magic word]] {{tlx|{{=}}}}, which expands to an equals sign that will not be interpreted. Another method is to replace the unnamed parameter specifications with named parameters specifications—unnamed parameters are equivalent to named parameters where the first unnamed parameter is named "1" and so on. To call template {{tl|done}} with <code>a=b</code> as the literal value for the first parameter, type either <code><nowiki>{{done|a{{=}}b}}</nowiki></code> or <code><nowiki>{{done|1=a=b}}</nowiki></code>. * Similarly, it is not possible to use an ordinary pipe character <code>|</code> in a template parameter specification, as it would be interpreted as separating one parameter specification from another.{{efn|Again, this does not apply if it comes within another separately parsed item, such as a piped wikilink.}} This problem can similarly be solved by using the magic word {{tlx|!}} in place of the pipe, or—if the pipe is not intended to be parsed at a higher level—using the [[List of XML and HTML character entity references|HTML entity]] <code>&#124;</code>. Alternatively, for embedding [[Help:Table|wikitables]] in templates, you may use {{tlx|Wikitable}} to avoid excessive {{tlx|!}}. * Remember that whitespace characters (spaces, tabs, carriage returns, and line feeds) are not automatically stripped from the start and end of unnamed parameters, unlike with named parameters. Including such characters (or any other non-visible characters in any parameters) may in some cases affect the template's behavior in unexpected ways. (Template designers can use {{tl|Trim}} to remove unwanted whitespace in unnamed parameters). * In documentation and discussions, it is customary to put the name of a template in double braces to emphasize the reference to a template (for example, use {{tl|Trim}} as the name of Template:Trim). If you just type <code><nowiki>{{Trim}}</nowiki></code> in the source page, that will of course call the template, so to make it easy to display the name with the braces, and also make the name a link to the template for the reader's convenience, there is the {{tl|tl}} template (the "'''t'''emplate '''l'''ink" template). For example, {{tnull|tl|Example}} produces {{tl|Example}}. There are various other [[Template:Template-linking templates|template-linking templates]] available with other functions. * When an editor changes a template (by editing the template or one of its subtemplates), the change will ultimately be reflected any time any page that transcludes that template is subsequently displayed. However, the change may not become visible on all pages immediately; a previously cached version of a page, based on the previous version of the template, may continue to be displayed for some time. Use the [[WP:Purge|purge]] function to force a page to be displayed using the latest versions of templates—including on the template page itself, if it contains usage examples. * When viewing old versions of pages, remember that templates will be transcluded as they are now, not necessarily as they were when the old page version was active. * To list all pages that transclude a template, use the [[Help:What links here|What links here]] link on the page when you display the template page. Note that this will {{em|not}} include pages where the template has been substituted, as there is no record of substitutions. * To get a list of templates transcluded on a page, bring up the edit page and find the list below the edit window. This list also includes the subtemplates used by the templates that are directly transcluded. To get such a list for a page section, an old version of the page,{{efn|For an old version, the subtemplate tree will be constructed according to the templates' current state.}} or your newly edited version prior to saving, click {{Button|Show preview}} on the appropriate edit page. * There are limits to the number and complexity of the templates that an article may have. See the "[[#Expand limits|§ Expand limits]]" section for help with this. * If you want the template to leave a [[WP:~|time stamp or signature]], you can write <code><noinclude><nowiki></noinclude><nowiki>~~~~~</nowiki><noinclude></nowiki></noinclude></code>, but this works only when you <em>substitute</em> the template. If you <em>transclude</em> it, you'll just get <nowiki>~~~~~</nowiki>. * To improve readability, programmers usually like to split code with newlines and indent it. Unfortunately, [[MediaWiki]] does not allow this technique; in many instances, these purpose-built newlines are treated by MediaWiki as content. One possible workaround is to add <code><!--</code> before each newline character and <code>--></code> after it, which produces an [[HTML comment]]. Summary: Please note that all contributions to Christianpedia may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here. You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Christianpedia:Copyrights for details). Do not submit copyrighted work without permission! Cancel Editing help (opens in new window) Discuss this page