Template talk:State Template

From GenWiki

Jump to: navigation, search

All templates should be saved as:

Template:Name_of_the_Template

Templates can then be imported into any page with: {{subst:Name_of_the_Template}}.

Templates can also be used as "text-fragments", which are just read in any page by using: {{Name_of_the_Template}}. In this case, if the template-text itself is changed, all pages, referencing this template-text, will show the new referenced text.

Would be nice, if someone can create a help-page for these tasks. --kpwessel 20:27, 15 Dec 2004 (CET)

  • You are a little bit ahead of me here..where can I find a little tutorial for this ? As soon as I familiarized myself with this topic I get cracking with the HELP page.. --wolf 21:09, 15 Dec 2004 (CET)
    • e.g. in the de-GenWiki or in the Wikipedia http://en.wikipedia.org/wiki/Help:Template and more general help in http://en.wikipedia.org/wiki/Help:Contents --kpwessel 00:08, 16 Dec 2004 (CET)
    • You have the strange habit of "cooking up" new challenges for me all the time and making my life much more interesting. I grab the basic idea and it sounds very interesting, however, as a more "practical" guy I can't see the proper implementation of it yet. Could you show me a little sample of it.. Thank you.. --wolf 04:08, 16 Dec 2004 (CET)
    •  ;-) OK, lets try.
{{subst:State_Template}} - this will read in as a permanent text into the page. You can then go and edit your page and modify as you want. The statement itself {{State_Template}} will not seen anymore in your page, as it is replaced with the template text itself. The "subst:" string shows, what its going to do: "substitute" the template text into this article.
{{Wappenrecht}} This is different. The text will be included "live" into the display article. When you are going to edit the article, then the shown statement {{State_Template}} will still be in the article. So you do not have to change the templates text. But, if you modify the template text itself, then all pages, including this "live"-Template, will use the new text. So the template is in this case a "Boilerplate" or a "text module". Does this give more ideas?  --kpwessel 13:19, 16 Dec 2004 (CET)
    • WOW.. you are great, now it makes sense !! I couldn't see any benefits without the "subst". Thanks..--wolf 19:49, 16 Dec 2004 (CET)
    • Do I miss out on anything ? My understanding is, with the "sub:" the actual text is inserted into the webpage, and whenever the Template is being changed, the text in ALL the pages will be changed automatically too. Apparently, that's not the case.. What sense does it make then to use the Template in the first place ?? A simple "Copy andPaste" does the same trick... Just wondering... --wolf 16:59, 17 Dec 2004 (CET)


      • Be careful! Its not "sub", its "subst"! But "subst" is substituting the text into the article and then its in there, forever. Without "subst" its just a reference to the Template and then it works, as you mentioned. Just tested it in the Sandbox with your Template:BLA. You are right: "subst" is nothing more doing, than a Cut&Paste will do. --kpwessel 09:38, 18 Dec 2004 (CET)
Personal tools
GenWiki-internal