Help:Template: Difference between revisions

From electowiki
Content added Content deleted
(Making a help page that lists all of the templates here. We should probably at least organize these if we don't delete some.)
 
(→‎Magic words: English Wikipedia has a helpful page about magic words: wikipedia:Help:Magic words, which can be helpful when creating/editing templates.)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{wikipedia}}
{{wikipedia}}
{{TopNavCat|Help}}
'''Help:Template''' will one day provide help for using templates on [[electowiki]]. As of right now, we just point you to [[wikipedia:Help:Template]]
'''Help:Template''' will one day provide help for using templates on [[electowiki]]. As of right now, we just point you to [[wikipedia:Help:Template]]


== List of all templates ==
== Substitution ==
:''main article: [[Help:Subst]]''


Sometimes, it's nice to be able to get the wikitext generated from a template, without actually embedding the template. A good example of this is for [[Template:US-State]]. This template can be used to make the pages for all 50 US States, and [[Washington D.C.]], and [[Puerto Rico]], and [[Guam]]....and well, you get the idea. So the first step is to do this
Below is a list of all of the templates on this wiki. There are a lot of them. We probably need to delete a few.

<code><nowiki>
{{US-State|name=Washington D.C.|region=Eastern}}
</nowiki></code>

But the problem with that is that it generates the following:

'''Washington D.C.''' is a state in the United States of America

Well, even though that ''should'' be the case, it's not yet (in June 2020). So what [[User:RobLa]] did when he made the [[Washington D.C.]] article was first created it with this:

<code><nowiki>
{{subst:US-State|name=Washington D.C.|region=Eastern}}
</nowiki></code>

...and then he edited it. The result is at this URL: https://electowiki.org/w/index.php?title=Washington_D.C.&oldid=11916


== Magic words ==
{{wikipedia|Help:Magic words}}

[[English Wikipedia]] has a helpful page about magic words: [[wikipedia:Help:Magic words]], which can be helpful when creating/editing templates.

== List of all templates ==
:''main article: [[Help:List of all templates]]''


This page used to have a list of all templates on this wiki. But that made the page ridiculous. There are a lot of them. We probably need to delete a few. See [[Help:List of all templates]] to see a list of all templates on this wiki.
{{Special:PrefixIndex/Template:}}

Latest revision as of 05:06, 1 September 2020

Wikipedia has an article on:
parent: Help

Help:Template will one day provide help for using templates on electowiki. As of right now, we just point you to wikipedia:Help:Template

Substitution

main article: Help:Subst

Sometimes, it's nice to be able to get the wikitext generated from a template, without actually embedding the template. A good example of this is for Template:US-State. This template can be used to make the pages for all 50 US States, and Washington D.C., and Puerto Rico, and Guam....and well, you get the idea. So the first step is to do this

 
  {{US-State|name=Washington D.C.|region=Eastern}}
  

But the problem with that is that it generates the following:

  Washington D.C. is a state in the United States of America 

Well, even though that should be the case, it's not yet (in June 2020). So what User:RobLa did when he made the Washington D.C. article was first created it with this:

 
  {{subst:US-State|name=Washington D.C.|region=Eastern}}
  

...and then he edited it. The result is at this URL: https://electowiki.org/w/index.php?title=Washington_D.C.&oldid=11916


Magic words

Wikipedia has an article on:

English Wikipedia has a helpful page about magic words: wikipedia:Help:Magic words, which can be helpful when creating/editing templates.

List of all templates

main article: Help:List of all templates

This page used to have a list of all templates on this wiki. But that made the page ridiculous. There are a lot of them. We probably need to delete a few. See Help:List of all templates to see a list of all templates on this wiki.