ModEnc is currently in Maintenance Mode: Changes could occur at any given moment, without advance warning.
Template:Anchor: Difference between revisions
Jump to navigation
Jump to search
m Sigh... |
m Reverted: Just kidding.. it works! Yay! |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly><span class="plainlinks" id="{{#ifeq:{{{2 | <includeonly>{{#if:{{{1|}}}|<span class="plainlinks" id="{{#ifeq:{{{2}}}|||{{{2|anchor}}}_}}{{{1}}}">{{#ifeq:{{{3}}}|||[{{fullurl:{{FULLPAGENAME}}#{{#ifeq:{{{2}}}|||{{{2|anchor}}}_}}{{{1}}}}} {{{3|{{{1}}}}}}]}}</span>|{{co|{{{1}}}|red}}}}</includeonly><noinclude> | ||
==Usage== | |||
{{Anchor{{!}}{{co|id|red}}{{!}}{{co|prefix|green}}?{{!}}{{co|hypertext|blue}}?}} | |||
Creates an anchor to this page specified by {{tt|{{co|id|red}}}}, to easily reference the text specified by {{tt|{{co|hypertext|blue}}}}. If not empty, {{tt|{{co|prefix|green}}_}} will be added before {{tt|{{co|id|red}}}} in the anchor namespace. {{tt|{{co|prefix|green}}}} defaults to {{tt|anchor}} if undefined. Hypertext for the anchor will be created if {{tt|{{co|hypertext|blue}}}} is not empty. {{tt|{{co|hypertext|blue}}}} defaults to {{co|id|red}}. | |||
===Example=== | |||
<pre>{{Anchor|reference1}}</pre> | |||
This code results in {{Anchor|reference1}} | |||
</noinclude> |
Latest revision as of 20:27, 20 May 2008
Usage
{{Anchor|id|prefix?|hypertext?}}
Creates an anchor to this page specified by id, to easily reference the text specified by hypertext. If not empty, prefix_ will be added before id in the anchor namespace. prefix defaults to anchor if undefined. Hypertext for the anchor will be created if hypertext is not empty. hypertext defaults to id.
Example
{{Anchor|reference1}}
This code results in reference1