Template:Title: Difference between revisions

From Shifti
Jump to navigation Jump to search
m kill the nice indentation and such in the template - it was causing problems when used.
add some debugging to see why "name omitted" fails
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:{{{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: {{{name| }}} | |
  Blank Name
  {{#ifeq: {{{author| }}} | |
    Blank Author
    {{#ifeq:{{NAMESPACE}} |User|
      Namespace is User
      <span style="font-size: 132%;"><b>{{SUBPAGENAME}}</b></span><br/>Author: ''[[User:{{BASEPAGENAME}}|{{BASEPAGENAME}}]]'' |
      Namespace isn't User
      <span style="font-size: 132%; font-weight: bold;">{{PAGENAME}}</span>
    }} |
    Author Given
    {{#ifeq: {{{user| }}} | |
      Blank Username
      Author: ''{{{author}}}'' |
      Username Given
      Author: ''[[User:{{{user}}}|{{{author}}}]]''
    }}
  }} |
  Name Given 
  <span style="font-size: 132%;"><b>{{{name}}}</b></span><br/>
  {{#ifeq: {{{author| }}} | |
    Blank Author
    {{#ifeq: {{NAMESPACE}} |User|
      User Namespace
      Author: ''[[User:{{BASEPAGENAME}}|{{BASEPAGENAME}}]]'' |
      Not User Namespace
      {{#ifeq: {{{user| }}} | |
        Blank User
        Author: ''{{{author}}}'' |
        User Given
        Author: ''[[User:{{{user}}}|{{{author}}}]]''
      }}
    }} |
    Author Given
    {{#ifeq: {{{user| }}} | |
      Blank User
      Author: ''{{{author}}}'' |
      User Given
      Author: ''[[USER:{{{user}}}|{{{author}}}]]''
    }}
  }}
}}<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 21:59, 22 July 2007

{{#ifeq: | |

 Blank Name
 {{#ifeq:   | |
   Blank Author
   {{#ifeq:Template |User|
     Namespace is User
     Title
Author: Title | Namespace isn't User Title }} | Author Given {{#ifeq: | | Blank Username Author: {{{author}}} | Username Given Author: [[User:{{{user}}}|{{{author}}}]] }} }} | Name Given {{{name}}}
{{#ifeq: | | Blank Author {{#ifeq: Template |User| User Namespace Author: Title | Not User Namespace {{#ifeq: | | Blank User Author: {{{author}}} | User Given Author: [[User:{{{user}}}|{{{author}}}]] }} }} | Author Given {{#ifeq: | | Blank User Author: {{{author}}} | User Given Author: [[USER:{{{user}}}|{{{author}}}]] }} }}

}}


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.