Difference between revisions of "User:Paxed/Template:tdx"

From NetHackWiki
Jump to navigation Jump to search
m
m
Line 1: Line 1:
<onlyinclude><includeonly>{{!}}{{#ifeq:{{SUBPAGENAME}}|{{{1}}}|style="background:red"}}{{!}} [[{{{1}}}{{#if:{{{2|}}}| {{!}}{{{2}}}}}]] </includeonly></onlyinclude>
+
<onlyinclude><includeonly>{{!}}{{#ifeq:{{PAGENAME}}|{{{1}}}|{{{3|style="background:green"}}}}}{{!}} [[{{{1}}}{{#if:{{{2|}}}| {{!}}{{{2}}}}}]] </includeonly></onlyinclude>
  
This template inserts a table cell with a link, and hilights the table cell with red background color, if the link is the current page.
+
This template inserts a table cell with a link, and hilights the table cell with green background color, if the link is the current page.
  
Usage: <tt><nowiki>{{tdx|A|B}}</nowiki></tt>
+
Usage: <tt><nowiki>{{tdx|A|B|C}}</nowiki></tt>
  
 
Where:
 
Where:
 
*A is the page to be linked to, and matched against the page title.
 
*A is the page to be linked to, and matched against the page title.
 
*B is an optional parameter used as the link name shown to user.
 
*B is an optional parameter used as the link name shown to user.
 +
*C is an optional parameter that can be used as the style to be used.
 +
 +
For example:
 +
<nowiki>
 +
{|
 +
{{tdx|Template:tdx}}
 +
{{tdx|something else}}
 +
|-
 +
{{}}

Revision as of 21:20, 5 March 2008


This template inserts a table cell with a link, and hilights the table cell with green background color, if the link is the current page.

Usage: {{tdx|A|B|C}}

Where:

  • A is the page to be linked to, and matched against the page title.
  • B is an optional parameter used as the link name shown to user.
  • C is an optional parameter that can be used as the style to be used.

For example: <nowiki>

Template:TdxTemplate:Tdx {{}}