Template:M: Difference between revisions

m
no edit summary
m (Updated the m template... template parameters are now read as parameters and turned back into text.)
mNo edit summary
Line 1: Line 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>
<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 of presenting "text" in '''bold with true type font''', plus citing it in '''literally''', i.e. not interpreting it.


==Syntax==
==Syntax==
Line 15: Line 15:
         '''<p2>'''  = 2nd template parameter name.
         '''<p2>'''  = 2nd template parameter name.
         ...
         ...
         '''<p2>'''  = 10th and last template parameter name.
         '''<p10>'''  = 10th and last template parameter name.


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


Resulting source code: <nowiki>'''<tt><nowiki>{{<template>}}</</nowiki><nowiki>nowiki></tt>'''</nowiki>
==Real-world Examples==
 
==Examples==
  <nowiki>{{m|message}}</nowiki>
  <nowiki>{{m|message}}</nowiki>
{{m|message}}
{{m|message}}
Line 30: Line 29:
{{m|<#>|<info>|<text>}}
{{m|<#>|<info>|<text>}}


<nowiki>{{m|quote|<#>|<user>|<quote>|<source>}}</nowiki>
{{m|quote|<#>|<user>|<quote>|<source>}}
{{eyecatch|Hint|The more observant wiki coder will notice that using <nowiki>|</nowiki> as an string character in <template>, e.g. <nowiki>delete|<reason></nowiki> is actually not allowed, but since the code interprets the additional columns as actual parameters, things work out fine.}}


[[Category:Template]]</noinclude>
[[Category:Template]]</noinclude>
1,633

edits

MediaWiki spam blocked by CleanTalk.
MediaWiki spam blocked by CleanTalk.