Difference between revisions of "User:Esteis/cmd"

From Wiki
Jump to navigation Jump to search
(Created page with "<onlyinclude><tt>{{#if:{{{1|}}}|[[Command/{{{1}}}|\{{{1}}}]]}}{{{2|}}}</tt></onlyinclude> ---- Link to a command; any text in the second template parameter is comes right after...")
 
(a bang for the wikilink pipe; a pipe to give the #if a link.)
 
Line 1: Line 1:
<onlyinclude><tt>{{#if:{{{1|}}}|[[Command/{{{1}}}|\{{{1}}}]]}}{{{2|}}}</tt></onlyinclude>
+
<onlyinclude><tt>{{#if:{{{1|}}}|[[Command/{{{1}}}{{!}}\{{{1}}}]]|}}{{{2|}}}</tt></onlyinclude>
  
 
----
 
----

Latest revision as of 22:45, 28 June 2012


Link to a command; any text in the second template parameter is comes right after the command, in typewriter font. Passing parameters is optional.

Usage:

   {{cmd|startalignment}}
   {{cmd|startalignment|[middle]}}
   {{cmd|section|{First section}}}
   {{cmd||\startalignment}}

Result:

   <tt>[[Command/startalignment|\startalignment]]</tt>
   <tt>[[Command/startalignment|\startalignment]][middle]</tt>
   <tt>[[Command/startalignment|\startalignment]]{First section}</tt>
   <tt>\startalignment</tt>