Template:Templatehelp: Difference between revisions

From FrathWiki
Jump to navigationJump to search
m (Corrected)
m (Typo)
 
(18 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{{:Help:{{FULLPAGENAME}}}}</includeonly>
<noinclude>
<noinclude>
== Usage ==
== Usage ==
{{:Help:{{{1}}}}}
 
If you put
 
  <nowiki>&lt;noinclude&gt;{{Templatehelp}}&lt;/noinclude&gt;</nowiki>
 
at the end of your template text the text of a like-named page in the <code>Help:</code> namespace.
 
For example the page <code>[[Help:Template:Voweltable]]</code> will be included when you ''view'' the page <code>[[Template:Voweltable]]</code> but not when you actually ''use''
<nowiki>{{Voweltable|</nowiki>''parameters''<nowiki>}}</nowiki>
 
in the body of another page.
 
If the help page has not yet been created there will appear a link to it instead of its not-yet-existing content, just as with not-yet-created templates.
 
=== Why? ===
 
The idea of (no)including a help page in a template page is that users can see usage instructions for a template when viewing the template page, but at the same time they won't get the whole of the usage instructions included when they use <code><nowiki>{{subst:</nowiki>''templatename''}}</nowiki></code>, but only the single line
 
<nowiki>&lt;noinclude&gt;{{Templatehelp}}&lt;/noinclude&gt;</nowiki>
 
which can then easily be removed.
 
The idea behind <code>[[Template:Templatehelp]]</code> itself
is of course to avoid inconsitency in the naming of templates and their related help pages.
 
=== A snag ===
 
I wish you shouldn't have to put <code><nowiki>{{Templatehelp}}</nowiki></code> inside <code><nowiki>&lt;noinclude&gt;...&lt;/noinclude&gt;</nowiki></code> tags, but there seems to be no way to avoid that. As things are those tags are of course very important!
 
 
Make sure to put
 
<nowiki>&lt;noinclude&gt;{{Templatehelpnote}}&lt;/noinclude&gt;</nowiki>
 
at the top of your help page! (Cf. <code>[[Template:Templatehelpnote]]</code>)
 
</noinclude>
</noinclude>

Latest revision as of 09:04, 15 November 2006


Usage

If you put

 <noinclude>{{Templatehelp}}</noinclude>

at the end of your template text the text of a like-named page in the Help: namespace.

For example the page Help:Template:Voweltable will be included when you view the page Template:Voweltable but not when you actually use

{{Voweltable|parameters}}

in the body of another page.

If the help page has not yet been created there will appear a link to it instead of its not-yet-existing content, just as with not-yet-created templates.

Why?

The idea of (no)including a help page in a template page is that users can see usage instructions for a template when viewing the template page, but at the same time they won't get the whole of the usage instructions included when they use {{subst:templatename}}</nowiki>, but only the single line

<noinclude>{{Templatehelp}}</noinclude>

which can then easily be removed.

The idea behind Template:Templatehelp itself is of course to avoid inconsitency in the naming of templates and their related help pages.

A snag

I wish you shouldn't have to put {{Templatehelp}} inside <noinclude>...</noinclude> tags, but there seems to be no way to avoid that. As things are those tags are of course very important!


Make sure to put

<noinclude>{{Templatehelpnote}}</noinclude>

at the top of your help page! (Cf. Template:Templatehelpnote)