I have a small handful of templates I'm running on my Wiki, which is running 1.6.10. I noticed on Wikipedia that there's a handy portion of the templates that says how the template in question is supposed to be used, which would be extremely helpful to me, as my Wiki tends to draw many people that are new to Wiki and Wiki markup. I think a "how to use" section would help save me from having to protect EVERY SINGLE TEMPLATE to avoid them getting vandalized or accidentally edited.
But the question is, how do I add this "Usage" section? I don't want it to appear as part of the template. I looked at the Wikipedia example, and it said {{{{FULLPAGENAME}}/doc}}, which I thought was a template, but when I looked for a template under that name (or just "fullpagename" both caps and not), I didn't find anything. I also searched for anything relating to 'template usage' and similar, but I came up with nothing. Can anyone help? Thanks in advance! -Azurite
Azurite:
I noticed on Wikipedia that there's a handy portion of the templates that says how the template in question is supposed to be used...
This is done with the <noinclude> tag. For example, add this to your template:
<noinclude> == Usage == text... </noinclude>
Stuff inside the noinclude section gets displayed when you look at the template itself, but *not* when you include the template. <includeonly> is also useful. See:
http://meta.wikimedia.org/wiki/Help:Template
Personally, I prefer to put the usage info on the talk page for a template; then you can link to it explicitly. There's then a "Discussion" section after the help. But that's a matter of preference.
Ian
Hi Ian & List, Thanks for the help. Through some additional digging, I stumbled across http://en.wikipedia.org/wiki/Wikipedia:Template_documentation, which I found to be pretty helpful, but there's still one thing I'm unclear on-- the "template doc page transcluded" or the "template doc page viewed directly." When I look at the actual template (http://www.seventh-star.net/wikific/index.php/Template:Endspoiler), it looks fine-- it includes the documentation I added and everything. But there's a link to that template "template doc page transcluded" which I guess isn't a default of MediaWiki, so it wants to be created. Or should it be? The Wikipedia page on this subject doesn't appear very clear (to someone like me, that doesn't really understand transclusion). Should I create that template, and include the same information as is here (http://en.wikipedia.org/wiki/Template:Template_doc_page_transcluded)? Or should it be something else? I'm not quite sure if it's meant to be general or specific, and I don't want to risk damaging the templates I've already set up. Thanks again, -Azurite
Azurite:
When I look at the actual template (http://www.seventh-star.net/wikific/index.php/Template:Endspoiler),
it
looks fine-- it includes the documentation I added and everything. But there's a link to that template "template doc page transcluded" which
I
guess isn't a default of MediaWiki, so it wants to be created.
What you're dealing with here is nothing to do with MediaWiki itself -- this "template doc page transcluded" stuff is all part of some conventional structure that the Wikipedia people use to organise and document their templates.
I'm guessing that you copied that template in from Wikipedia? I can't view the source, so it's hard to tell. But basically your template includes an invocation of a template called "Template:Template doc page transcluded", which doesn't exist in your Wiki. On Wikipedia, as far as I can tell, that template is just a notice which is part of how Wikipedia handles its templates. (They create a sub-page called "Template:xxx/doc" to hold the documentation for a template xxx.)
If you want to copy the whole Wikipedia template strategy, then you'll need that template, and probably a bunch of other stuff. Personally, I wouldn't bother; just cut out the {{Template:Template doc page transcluded}} call from your template.
Ian
Azurite wrote:
But the question is, how do I add this "Usage" section? I don't want it to appear as part of the template. I looked at the Wikipedia example, and it said {{{{FULLPAGENAME}}/doc}}, which I thought was a template, but when I looked for a template under that name (or just "fullpagename" both caps and not), I didn't find anything. I also searched for anything relating to 'template usage' and similar, but I came up with nothing. Can anyone help? Thanks in advance! -Azurite
{{FULLPAGENAME}} is a magic word [1] which get replace by "current page name". So if Template:Foo contains <noinclude>{{{{FULLPAGENAME}}/doc}}</noinclude> It means "Put here the content at Template:Foo/doc, but only if the user is viewing Template:Foo, not if he's viewing a page which has {{Foo}} in it.
1 - http://en.wikipedia.org/wiki/Help:Magic_words#Page_names_and_related_info
mediawiki-l@lists.wikimedia.org