Help:Subst: Difference between revisions

From electowiki
Content added Content deleted
m (RobLa moved page Help:Substitution to Help:Subst: This is the name of the keyword)
(→‎Subst-only templates: renaming section to "Subst-only templates". With any luck Help:Subst#Subst-only will also still work)
 
(One intermediate revision by the same user not shown)
Line 2: Line 2:
:''parent: [[Help:Contents]]''
:''parent: [[Help:Contents]]''


This Help page ([[Help:Substitution]] or [[Help:Subst template]] or just [[Help:Subst]]) tries to describe how "subst" templates work. Except it does a really poor job. Go check out [[wikipedia:Help:Substitution]], since that will probably be more helpful.
This Help page ('''Help:Substitution''' or '''Help:Subst template''' or just [[Help:Subst]]) tries to describe how "subst" templates work. Except it does a really poor job. Go check out [[wikipedia:Help:Substitution]], since that will probably be more helpful.




== Subst-only ==
== Subst-only templates==
<div id="Subst-only"></div>


Some templates are really only designed to be used with the "<code>subst</code>" keyword.
Some templates are really only designed to be used with the "<code>subst</code>" keyword. These are also known as '''Subst-only templates'''


Most templates get included like this:
Most templates get included like this:

Latest revision as of 04:01, 17 June 2020

Wikipedia has an article on:
parent: Help:Contents

This Help page (Help:Substitution or Help:Subst template or just Help:Subst) tries to describe how "subst" templates work. Except it does a really poor job. Go check out wikipedia:Help:Substitution, since that will probably be more helpful.


Subst-only templates

Some templates are really only designed to be used with the "subst" keyword. These are also known as Subst-only templates

Most templates get included like this:

 
  {{Wikipedia}}
  

But a subst template gets included like this:

 
  {{subst:Wikipedia}}
  

What happens is that the generated wiki text replaces the template.

That's not a great explanation. Search for "subst-only" and "Wikipedia" using your favorite search engine, and you'll probably find a better explanation.