Difference between revisions of "Template:Usage"

From Eclipsepedia

Jump to: navigation, search
(Usage)
 
(19 intermediate revisions by one user not shown)
Line 2: Line 2:
 
Nasty meta-template for providing template usage information.  The intention is to provide a standardized formatting for showing template usage within the body of the template itself.  Instructions for the uninitiated will be forthcoming...
 
Nasty meta-template for providing template usage information.  The intention is to provide a standardized formatting for showing template usage within the body of the template itself.  Instructions for the uninitiated will be forthcoming...
  
Due to inadequacies in the MediaWiki markup, the syntax to actually use ''this'' template is a little odd. They follow:
+
Due to inadequacies in the MediaWiki markup, the syntax to actually use ''this'' template is a little odd.
  
 
==Usage==
 
==Usage==
  
<pre>{{Usage|<nowiki>{{MailingList|dev}}</nowiki>|{{MailingList|dev}}}}</pre>
+
{{codeblock|1=<nowiki>{{Usage
 +
| &lt;pre&gt;{{MailingList|dev}}&lt;/pre&gt;
 +
| 2={{MailingList|dev}}
 +
}}</nowiki>}}
  
 
Renders as:
 
Renders as:
  
{| style="background-color: #dadada" width="100%"
+
{{Usage
 +
| <pre>{{MailingList|dev}}</pre>
 +
| 2={{MailingList|dev}}
 +
}}
 +
 
 +
'''Note:''' The "2=" bit is optional if the ''value'' of the rendered template in question does not include the '''=''' character.  See [http://en.wikipedia.org/wiki/Help:Template#Restrictions_on_parameter_values this page] for a full list of parameter limitations and relevant workarounds.
 +
 
 +
</noinclude><includeonly>{| cellpadding="5" border="1"
 +
! Markup !! Rendering
 +
|-
 +
| {{codeblock|1={{{1}}}}}
 
  |  
 
  |  
{{Usage|<nowiki>{{MailingList|dev}}</nowiki>|{{MailingList|dev}}}}
+
{{{2}}}
 
  |}
 
  |}
 
+
</includeonly>
</noinclude><includeonly>===Usage===
+
 
+
<table><tr><td>
+
{{{1}}}
+
</td></tr></table>
+
 
+
Renders as:
+
 
+
{{{2}}}</includeonly>
+

Latest revision as of 16:28, 23 March 2008

Nasty meta-template for providing template usage information. The intention is to provide a standardized formatting for showing template usage within the body of the template itself. Instructions for the uninitiated will be forthcoming...

Due to inadequacies in the MediaWiki markup, the syntax to actually use this template is a little odd.

[edit] Usage

{{Usage
 | <pre>{{MailingList|dev}}</pre>
 | 2={{MailingList|dev}}
 }}

Renders as:

Markup Rendering
{{MailingList|dev}}

Mailinglist.gif dev@eclipse.org


Note: The "2=" bit is optional if the value of the rendered template in question does not include the = character. See this page for a full list of parameter limitations and relevant workarounds.