Template:Part: Difference between revisions

From Shifti
Jump to navigation Jump to search
m Protected "Template:Part": It was hard enough to make this work. There is no reason for the average user to edit this template. [edit=sysop:move=sysop]
mNo edit summary
 
(26 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#ifeq: {{{name| }}} | |
<includeonly>
  {{#ifeq: {{{number| }}} | |
{{#vardefine:name|{{{name| }}}}}
    === Usage Error! === |
{{#vardefine:number|{{{number| }}}}}
    === Part {{{number}}} ===
{{#vardefine:text|{{#ifeq:{{#var:name}}| |{{#ifeq:{{#var:number}}| |<hr/>|Part {{{number}}}}}|{{#ifeq:{{#var:number}}| |{{{name}}}|Part {{{number}}}: {{{name}}}}}}}}}
  }} |  
{{#ifeq:{{NAMESPACE}}|Template|<nowiki>{{part|name=section name|number=section number|seper=separator template type}}</nowiki>|{{#ifeq:{{{seper| }}}| |{{#ifeq:{{#var:text}}|<hr/>|===<hr/>===|==={{#var:text}}===}}|{{#ifeq:{{{seper}}}|hr|==={{Separator}}===
  {{#ifeq: {{{number| }}} | |
==={{#var:text}}===|==={{Separator|{{{seper}}}|{{#var:text}}}}===}}}}}}</includeonly>
    === {{{name}}} === |
    === Part {{{number}}}: {{{name}}} ===  
  }}
}}
<br/>
<noinclude>
<noinclude>
;Usage&#58;: &#123;&#123;part|name=Name|number=Number&#125;&#125;
__NOTOC__
;Usage&#58;: &#123;&#123;part|name=Name|number=Number|seper=type&#125;&#125;
:: <span style="font-size: 14pt;>You '''''can''''' omit the parameters (as shown), but this gives you a "usage error" for the heading.</span>
:: <span style="font-size: 14pt;>You '''''can''''' omit the parameters (as shown), but this gives you a "usage error" for the heading.</span>
:: (As you can see, four or more headings automatically creates a Table of Contents.)
:: (Four or more headings automatically creates a Table of Contents.)
&#123;&#123;part&#125;&#125; nets you&#58;
:: The "seper" parameter refers to one of the types of separators that can take a text argument. See [[Help:Templates]] and [[Template:Separator]] for more information. Use "seper=hr" if you want a horizontal rule type separator instead of one of the graphical ones.
=== Usage Error! ===
:: See [[User:ShadowWolf/Test_Page]] for examples.
 
<span style="font-size: 150%; font-weight: 132%;">WARNING: This Template Has Been Deprecated!</span>
&#123;&#123;part|number=1&#125;&#125; nets you&#58;
=== Part 1 ===
 
&#123;&#123;part|name=Test&#125;&#125; nets you&#58;
=== Test ===
 
&#123;&#123;part|name=Test|number=1&#125;&#125; nets you&#58;
=== Part 1&#58; Test ===
</noinclude>
</noinclude>

Latest revision as of 03:07, 5 August 2007


Usage:
{{part|name=Name|number=Number|seper=type}}
You can omit the parameters (as shown), but this gives you a "usage error" for the heading.
(Four or more headings automatically creates a Table of Contents.)
The "seper" parameter refers to one of the types of separators that can take a text argument. See Help:Templates and Template:Separator for more information. Use "seper=hr" if you want a horizontal rule type separator instead of one of the graphical ones.
See User:ShadowWolf/Test_Page for examples.

WARNING: This Template Has Been Deprecated!