Doctor Who Cuttings Archive

Difference between revisions of "Template:InvertName"

From The Doctor Who Cuttings Archive
Jump to navigationJump to search
Line 5: Line 5:
 
{{#if: {{#expr: {{#var:pos}} > 0}}  
 
{{#if: {{#expr: {{#var:pos}} > 0}}  
 
     | {{#vardefine:lastName  | {{#sub: {{#var:temp}} | {{#expr: {{#var:pos}} + 1 }} }} }}
 
     | {{#vardefine:lastName  | {{#sub: {{#var:temp}} | {{#expr: {{#var:pos}} + 1 }} }} }}
       {{#vardefine:firstName | {{#sub: {{#var:temp}} | 0 | {{#expr: {{#var:pos}} - 1 }} }} }}
+
       {{#vardefine:firstName | {{#sub: {{#var:temp}} | 0 | {{#var:pos}} }} }}
 
       {{#var:lastName}}, {{#var:firstName}}
 
       {{#var:lastName}}, {{#var:firstName}}
 
     | {{{author}}}
 
     | {{{author}}}
 
}}
 
}}

Revision as of 13:03, 20 October 2013

Var temp = {{{author}}}

var temp = -1 {{{author}}}, {{{author}}