Template:Italic title: Difference between revisions

From Vigyanwiki
Template>Happy-melon
(sometimes we can do it automatically)
Template>Davidgothberg
(Changed to use the more efficient {{str len full}}. Removed code duplication. Removed <includeonly>, let's show what it does here. Tested in /sandbox. No change in functionality.)
Line 1: Line 1:
<includeonly><span id="RealTitle" style="display:none"><!--
<span id="RealTitle" style="display:none;">{{
-->{{#switch: <!--
#switch:
    -->{{#ifexpr: {{str_find|{{PAGENAME}}|(}} != -1 | 1 | 0  
  {{#ifexpr: {{str find|{{PAGENAME}}|(}} != -1
      }}{{#if:     {{{force|}}}                     | 1 | 0
  | 1
      }}{{#ifexpr: {{str_len|{{PAGENAME}}}} < 50     | 1 | 0
  | 0
      }}
  }}{{#if: {{{force|}}}  
    |100 = {{#if:{{NAMESPACE}}
  | 1
            |{{#switch:{{FULLPAGENAME}}
  | 0
              |{{NAMESPACE}}:{{{1}}} ({{{2|}}}) = {{NAMESPACE}}:''{{{1}}}'' ({{{2|}}})
  }}{{#ifexpr: {{str len full|{{PAGENAME}}}} < 50   <!-- The max {{str find}} can handle -->
              |{{NAMESPACE}}:{{{1}}} ({{{3|}}}) = {{NAMESPACE}}:''{{{1}}}'' ({{{3|}}})
  | 1
              |{{NAMESPACE}}:{{{1}}} ({{{4|}}}) = {{NAMESPACE}}:''{{{1}}}'' ({{{4|}}})
  | 0
              |{{NAMESPACE}}:{{{1}}} ({{{5|}}}) = {{NAMESPACE}}:''{{{1}}}'' ({{{5|}}})
  }}
              |{{NAMESPACE}}:{{{1}}} ({{{6|}}}) = {{NAMESPACE}}:''{{{1}}}'' ({{{6|}}})
 
              |#default = {{FULLPAGENAME}}
| 100 =  
            }}
  {{#if:{{NAMESPACE}}
            |{{#switch:{{PAGENAME}}
  | {{NAMESPACE}}:
              |{{{1}}} ({{{2|}}}) = ''{{{1}}}'' ({{{2|}}})
  }}{{#switch:{{PAGENAME}}
              |{{{1}}} ({{{3|}}}) = ''{{{1}}}'' ({{{3|}}})
  | {{{1}}} ({{{2|}}}) = ''{{{1}}}'' ({{{2|}}})
              |{{{1}}} ({{{4|}}}) = ''{{{1}}}'' ({{{4|}}})
  | {{{1}}} ({{{3|}}}) = ''{{{1}}}'' ({{{3|}}})
              |{{{1}}} ({{{5|}}}) = ''{{{1}}}'' ({{{5|}}})
  | {{{1}}} ({{{4|}}}) = ''{{{1}}}'' ({{{4|}}})
              |{{{1}}} ({{{6|}}}) = ''{{{1}}}'' ({{{6|}}})
  | {{{1}}} ({{{5|}}}) = ''{{{1}}}'' ({{{5|}}})
              |#default = {{FULLPAGENAME}}
  | {{{1}}} ({{{6|}}}) = ''{{{1}}}'' ({{{6|}}})
            }}
  | #default = {{PAGENAME}}
          }}
  }}
    |101 = {{#if:{{NAMESPACE}}
 
            |{{NAMESPACE}}:''{{str_left| {{PAGENAME}} | {{#expr:{{str_find|{{PAGENAME}}|(}}-2}} }}'' {{str_sub| {{PAGENAME}} | {{str_find|{{PAGENAME}}|(}} | {{#expr: {{str_len|{{PAGENAME}}}} - {{str_find|{{PAGENAME}}|(}} }} }}
| 101 =  
            |''{{str_left| {{PAGENAME}} | {{#expr:{{str_find|{{PAGENAME}}|(}}-2}} }}'' {{str_sub| {{PAGENAME}} | {{str_find|{{PAGENAME}}|(}} | {{#expr: {{str_len|{{PAGENAME}}}} - {{str_find|{{PAGENAME}}|(}} }} }}
  {{#if:{{NAMESPACE}}
          }}
  | {{NAMESPACE}}:
    |010
  }}''{{str left| {{PAGENAME}} | {{#expr:{{str find|{{PAGENAME}}|(}}-2}} }}'' {{str sub| {{PAGENAME}} | {{str find|{{PAGENAME}}|(}} | {{#expr: {{str len full|{{PAGENAME}}}} - {{str find|{{PAGENAME}}|(}} }} }}
    |011
 
    |110
| 010
    |111
| 011
    |001 = {{#if:{{NAMESPACE}}
| 110
            |{{NAMESPACE}}:''{{PAGENAME}}''
| 111
            |''{{PAGENAME}}''
| 001 =  
          }}
  {{#if:{{NAMESPACE}}
    |000 = {{FULLPAGENAME}}
  | {{NAMESPACE}}:
  }}<!--
  }}''{{PAGENAME}}''
--></span></includeonly><noinclude>
 
| 000 = {{FULLPAGENAME}}
 
}}</span><noinclude>
 
{{documentation}}
{{documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>
</noinclude>

Revision as of 06:51, 29 March 2009

Template documentation