Template:Title: Difference between revisions

From Shifti
Jump to navigation Jump to search
m strip nice formatting so the parser doesn't confuse the indentation with <pre>
m update to make use of the Variables extension
Line 1: Line 1:
{{#ifeq:{{{name| }}}| |{{#ifeq:{{{author| }}}| |{{#ifeq:{{NAMESPACE}}|User|<span style="font-size: 132%;"><b>{{SUBPAGENAME}}</b></span><br/>Author: ''[[User:{{BASEPAGENAME}}|{{BASEPAGENAME}}]]''|<span style="font-size: 132%; font-weight: bold;">{{PAGENAME}}</span>}}|{{#ifeq:{{NAMESPACE}}|User|<span style="font-size: 132%;"><b>{{SUBPAGENAME}}</b></span><br/>|<span style="font-size: 132%; font-weight: bold;">{{PAGENAME}}</span>}}{{#ifeq:{{{user| }}}| |Author: ''{{{author}}}''|Author: ''[[User:{{{user}}}|{{{author}}}]]''}}}}|<span style="font-size: 132%;"><b>{{{name}}}</b></span><br/>{{#ifeq:{{{author| }}}| |{{#ifeq: {{NAMESPACE}}|User|Author: ''[[User:{{BASEPAGENAME}}|{{BASEPAGENAME}}]]''|{{#ifeq: {{{user| }}}| |Author: ''{{{author}}}''|Author: ''[[User:{{{user}}}|{{{author}}}]]''}}}}|{{#ifeq:{{{user| }}}| |Author: ''{{{author}}}''|Author: ''[[USER:{{{user}}}|{{{author}}}]]''}}}}}}<hr/><noinclude>
{{#ifeq: {{NAMESPACE}} |User|
  {{#vardefine:auth|{{{author|{{BASEPAGENAME}}}}}}}
  {{#vardefine:uname|{{{user|{{BASEPAGENAME}}}}}}}
  {{#vardefine:pname|{{{name|{{SUBPAGENAME}}}}}}} |
  {{#vardefine:auth|{{{author| }}}}}
  {{#vardefine:uname|{{{user|{{{author| }}}}}}}}
  {{#vardefine:pname|{{{name|{{PAGENAME}}}}}}}
}}
 
<span style="font-size: 132%; font-weight: bold;">{{#var:pname}}</span><br/>
{{#ifeq: {{#var:auth}} | |
  {{#ifeq: {{#var:uname}} | ||
    Author: ''[[User:{{#var:uname}}|{{#var:uname}}]]''
  }} |
  {{#ifeq: {{#var:uname}} | |
    Author: ''{{#var:auth}}'' |
    Author: ''[[User:{{#var:uname}}|{{#var:auth}}]]''
  }}
}}
<hr/><noinclude>
Usage: <nowiki>{{title|name=Story Title|author=Author Name|user=shifti user name}}</nowiki>
Usage: <nowiki>{{title|name=Story Title|author=Author Name|user=shifti user name}}</nowiki>
:This generates a headerbar like you see above, with <nowiki>{{{name}}}, {{{author}}} and {{{user}}}</nowiki> values properly replaced. <nowiki>{{{user}}}</nowiki> is used to generate a link back to the authors user page. Any of the parameters can be omitted - in fact, on a page that is a sub-page of a user page they can be omitted entirely and the header will still be be properly generated. On other pages omission of all the parameters will result in only the addition of the story title. For an example of what all of the preceding means, take a look at [[User:ShadowWolf/Test Page]].
:This generates a headerbar like you see above, with <nowiki>{{{name}}}, {{{author}}} and {{{user}}}</nowiki> values properly replaced. <nowiki>{{{user}}}</nowiki> is used to generate a link back to the authors user page. Any of the parameters can be omitted - in fact, on a page that is a sub-page of a user page they can be omitted entirely and the header will still be be properly generated. On other pages omission of all the parameters will result in only the addition of the story title. For an example of what all of the preceding means, take a look at [[User:ShadowWolf/Test Page]].
</noinclude>
</noinclude>

Revision as of 01:09, 23 July 2007

{{#ifeq: Template |User|


  |
 
 
 

}}

Title
{{#ifeq: | |

 {{#ifeq:  | ||
   Author: [[User:|]]
 }} |
 {{#ifeq:  | |
   Author: ' |
   Author: [[User:|]]
 }}

}}


Usage: {{title|name=Story Title|author=Author Name|user=shifti user name}}

This generates a headerbar like you see above, with {{{name}}}, {{{author}}} and {{{user}}} values properly replaced. {{{user}}} is used to generate a link back to the authors user page. Any of the parameters can be omitted - in fact, on a page that is a sub-page of a user page they can be omitted entirely and the header will still be be properly generated. On other pages omission of all the parameters will result in only the addition of the story title. For an example of what all of the preceding means, take a look at User:ShadowWolf/Test Page.