Template:NavLink: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>Ulti
added currentcss parameter
imported>Ulti
allowing both encoded and non-encoded page names to be tested in the ifeq, to detect if it's the active page
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{#ifeq: {{FULLPAGENAMEE}} | {{{1}}} | style="{{{currentcss|background-color:#e9ebf5;}}}"| style="{{{css|background-color:white;}}}"}} |<!--
<includeonly>{{#if:{{#ifeq: {{FULLPAGENAMEE}} | {{{1}}} | true |}}{{#ifeq: {{FULLPAGENAME}} | {{{1}}} | true |}}| style="{{{currentcss|background-color:#e9ebf5;}}}"| style="{{{css|background-color:white;}}}"}} |<!--
--><nowiki>&nbsp;&nbsp;</nowiki>[[{{{1}}}|<span style="font-weight:normal;">{{{2}}}</span>]]<nowiki>&nbsp;&nbsp;</nowiki>
--><nowiki>&nbsp;&nbsp;</nowiki>[[{{{1}}}|<span style="font-weight:normal;">{{{2|{{{1}}}}}}</span>]]<nowiki>&nbsp;&nbsp;</nowiki></includeonly><noinclude>{{Documentation}}[[Category:Basic Templates]]</noinclude>

Latest revision as of 08:51, 30 September 2015

  NavLink     NavLink/doc  

The above is an example which renders from:

{| class="wikitable" cellpadding="3"
|-
| {{NavLink|Template:NavLink|NavLink}}
| {{NavLink|Template:NavLink/doc|NavLink/doc}}
|}

Alternatively, we can omit a parameter and not specify text for the link:

{| class="wikitable" cellpadding="3"
|-
| {{NavLink|Template:NavLink}}
| {{NavLink|Template:NavLink/doc}}
|}

which renders the slightly different:

  Template:NavLink     Template:NavLink/doc