Template:M: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
mNo edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly>'''<tt><nowiki>{{</nowiki>{{{1}}} | <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>{{{{PAGENAME}}/doc}}[[Category:Template]]</noinclude> | ||
#{{ | |||
{{ | |||
{{ | |||
{{ | |||
[[Category:Template]]</noinclude> |
Latest revision as of 22:12, 6 May 2009
Convenient shortcut of presenting "text" in bold with true type font, plus citing it literally, i.e. not interpreting it.
Note The text is prefixed with {{, and }} is appended!
Syntax
The template can have 1 to 11 parameters:
- {{m|<template>}} - Template name.
- {{m|<template>|<parameter1>}} - Template name with 1 parameter.
- {{m|<template>|<p1>|<p2>}} - Template name with 2 parameters.
- ...
- {{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. ... <p10> = 10th and last template parameter name.
Resulting source code: '''<tt><nowiki>{{<template>}}</nowiki></tt>'''
Real-world Examples
{{m|message}}
{{message}}
{{m|delete|<reason>}}
{{delete|<reason>}}
{{m|eyecatch|<#>|<info>|<text>}}
{{eyecatch|<#>|<info>|<text>}}
{{m|quote|<#>|<user>|<quote>|<source>}}
{{quote|<#>|<user>|<quote>|<source>}}
Hint | The more observant wiki coder will notice that using | as a string character in <template>, e.g. delete|<reason> is actually not allowed, but since the code interprets the additional | delimited columns as actual parameters, things work just fine. |