Template:Based on template

From PCSAR

(Difference between revisions)
Jump to: navigation, search
Current revision (13:43, 7 September 2015) (edit) (undo)
 
(4 intermediate revisions not shown.)
Line 1: Line 1:
-
<noinclude>{{documentation}}</noinclude><includeonly><!--
+
<noinclude>{{documentation}}</noinclude><includeonly><noinclude>
-
--><div class="noprint"><!--
+
;;;;;;;;;;;;; This header box should not be printed, because using templates require live access to the wiki
-
-->{{standout box|
+
</noinclude><div class="noprint"><noinclude>
 +
 
 +
</noinclude>{{standout box|
This page is based on the [[:Template:{{{1}}}|{{{1}}}]] template.
This page is based on the [[:Template:{{{1}}}|{{{1}}}]] template.
-
Use that template to make [[:Category:{{{1}}}|similar pages]].{{not in template|[[Category:{{{1}}}]]}}
+
Use that template to make [[:Category:{{{1}}}|similar pages]].
-
}}<!--
+
}}<noinclude>
 +
 
 +
</noinclude></div><noinclude>
 +
 
 +
;;;;;;;;;;; Place in the category
 +
 
 +
</noinclude>{{#if:{{{Templates|}}}<noinclude>
 +
 
 +
;;;;;;;;;;;;;;;; If we're allowed in templates, just say we're in the category
 +
 
 +
</noinclude>|[[Category:{{{1}}}]]<noinclude>
 +
 
 +
;;;;;;;;;;;;;;;; Otherwise do it only if we're not in a template page
 +
 
 +
</noinclude>|{{not in template|[[Category:{{{1}}}]]}}<noinclude>
-
--></div><!--
+
</noinclude>}}<noinclude>
-
--></includeonly>
+
</noinclude></includeonly>

Current revision

This is the documentation for the template Template:Based on template

Template:Based on template/Doc:

The template {{Based on template|TemplateName|Templates=y}} is a template for use by "subst:" templates. It puts a header at the top of the replaced page that says how to access the template for similar pages.

TemplateName 
the name of the template the page is based on.
Templates 
(optional) if set to any value, templates will be included in the category. Default is to not include templates. This helps keep the category clear of documentation pages that use the template as an example.

Include it by putting at the top of the template

{{Based on template|TemplateName}}

If you do, what you'll then get is this:

This page is based on the TemplateName template.

Use that template to make similar pages.

The page is automatically included in the Category of the same name.


To see how this template is implemented, edit this page and examine the portion between <includeonly> and </includeonly>.

Personal tools