Template:M: Difference between revisions

From AniDB
Jump to navigation Jump to search
No edit summary
m (Updated the m template... template parameters are now read as parameters and turned back into text.)
Line 1: Line 1:
<includeonly>'''<tt><nowiki>{{</nowiki>{{{1}}}<nowiki>}}</nowiki></tt>'''</includeonly><noinclude>
<includeonly>'''<tt><nowiki>{{</nowiki>{{{1}}}{{#if: {{{2|}}}|{{!}}{{{2}}}|}}{{#if: {{{3|}}}|{{!}}{{{3}}}|}}{{#if: {{{4|}}}|{{!}}{{{4}}}|}}{{#if: {{{5|}}}|{{!}}{{{5}}}|}}{{#if: {{{6|}}}|{{!}}{{{6}}}|}}{{#if: {{{7|}}}|{{!}}{{{7}}}|}}{{#if: {{{8|}}}|{{!}}{{{8}}}|}}{{#if: {{{9|}}}|{{!}}{{{9}}}|}}{{#if: {{{10|}}}|{{!}}{{{10}}}|}}{{#if: {{{11|}}}|{{!}}{{{11}}}|}}<nowiki>}}</nowiki></tt>'''</includeonly><noinclude>
 
Convenient shortcut for "citing" templates in e.g. syntax examples.
Convenient shortcut for "citing" templates in e.g. syntax examples.


==Syntax==
==Syntax==
The template can have '''1 parameter''':
The template can have '''1''' to '''11 parameters''':
#{{m|m{{!}}<template>}} - Template name.
#{{m|m{{!}}<template>}} - Template name.
#{{m|m{{!}}<template>{{!}}<parameter1>}} - Template name with 1 parameter.
#{{m|m{{!}}<template>{{!}}<p1>{{!}}<p2>}} - Template name with 2 parameters.
# ...
#{{m|m{{!}}<template>{{!}}<p1>{{!}}<p2>{{!}} ... {{!}}<p10>}} - Template name with 10 parameters.
  '''<template>'''  =  The template name you want to see in bold, with true type font.
'''<parameter1>'''  = 1st template parameter name.
        '''<p2>'''  = 2nd template parameter name.
        ...
        '''<p2>'''  = 10th and last template parameter name.


'''<template>''' =  The template name you want to see in bold, with true type font,
              possibly with {{m|!}} delimited parameters.


  Resulting source code: <nowiki>'''<tt><nowiki>{{<template>}}</</nowiki><nowiki>nowiki></tt>'''</nowiki>
  Resulting source code: <nowiki>'''<tt><nowiki>{{<template>}}</</nowiki><nowiki>nowiki></tt>'''</nowiki>
Line 16: Line 24:
{{m|message}}
{{m|message}}


  <nowiki>{{m|delete{{!}}<reason>}}</nowiki>
  <nowiki>{{m|delete|<reason>}}</nowiki>
{{m|delete{{!}}<reason>}}
{{m|delete|<reason>}}
 
<nowiki>{{m|<#>|<info>|<text>}}</nowiki>
{{m|<#>|<info>|<text>}}


{{eyecatch|Limitation|When using templates with parameters as values for <template>, you will need to use {{m|!}} as the delimiter, i.e. '''<nowiki>delete|<reason></nowiki>''' has to be replaced with '''<nowiki>delete{{!}}<reason></nowiki>'''.}}


[[Category:Template]]</noinclude>
[[Category:Template]]</noinclude>

Revision as of 21:50, 6 May 2009

Convenient shortcut for "citing" templates in e.g. syntax examples.

Syntax

The template can have 1 to 11 parameters:

  1. {{m|<template>}} - Template name.
  2. {{m|<template>|<parameter1>}} - Template name with 1 parameter.
  3. {{m|<template>|<p1>|<p2>}} - Template name with 2 parameters.
  4. ...
  5. {{m|<template>|<p1>|<p2>| ... |<p10>}} - Template name with 10 parameters.
  <template>  =  The template name you want to see in bold, with true type font.

<parameter1>  = 1st template parameter name.
        <p2>  = 2nd template parameter name.
        ...
        <p2>  = 10th and last template parameter name.


Resulting source code: '''<tt><nowiki>{{<template>}}</nowiki></tt>'''

Examples

{{m|message}}

{{message}}

{{m|delete|<reason>}}

{{delete|<reason>}}

{{m|<#>|<info>|<text>}}

{{<#>|<info>|<text>}}