Template talk:Subst
From Wikipedia, the free encyclopedia
[edit] See also
[edit] subst:
This convesation was migrated from Wikipedia:Help desk at 05:33, 16 August 2005 (UTC).
What is the point in using the syntax {{subst:Template name}}? Couldn't we just use the forumla {{Template name}}? CG 16:28, August 15, 2005 (UTC)
- Usually, we do use {{Template name}}. Subst: expands the template in its current form and freezes it. It is also useful if the template doesn’t fit and needs to be customised, but then leaves the overhead of updating by hand if you ever change in the future. Susvolans (pigs can fly) 16:37, 15 August 2005 (UTC)
- Don't forget to "subst" templates when you use them on talk pages - it reduces server load, and prevents accidental blanking of the template (and yes, that is a "subst" version of Template:Subst). Zzyzx11 (Talk) 16:45, 15 August 2005 (UTC)
- Generally, we also use Subst on templates that are used on thousands of pages like Template:vfd. Because the template and each page are treated as seperate data, the server generates a cache of any pages which use that template. And so one change to the template will increase the server load because it will have to modify the entire cache again. Pages with "subst" templates are not stored in the cache because the code text already stored on the page. If you are interested in the technical details, please read m:Help:Template. Zzyzx11 (Talk) 16:57, 15 August 2005 (UTC)
- In short: without subst, the template will be loaded every time you load the page. If you use subst: the text will from the template will be included. Changing the template after inclusion won't change the text on an article when using subst:.
(end migration)
[edit] accidental blanking
how does subst prevent accidental blanking? →AzaToth 21:34, 13 December 2005 (UTC)
- When templates containing a section are used, MediaWiki treats them as just another section and adds the usual [edit] link. Users will often edit the last section to add a new message at the bottom of the page, which leads to people leaving messages in the template since [edit] leads directly there. By substituting text, the [edit] link edits that section of the page instead of the template. // Pathoschild 21:58, 13 December 2005 (UTC)