ModEnc is currently in Maintenance Mode: Changes could occur at any given moment, without advance warning.

Template:Anchor: Difference between revisions

From ModEnc
Jump to navigation Jump to search
m fixing
Vinifera7 (talk | contribs)
m Reverted: Just kidding.. it works! Yay!
 
(12 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>[[#{{{3|{{{1}}}}}}]] ([{{fullurl:{{FULLPAGENAME}}#{{{2|anchor}}}_{{{1}}}}} #])</includeonly><noinclude>Usage:<pre>{{Anchor|name|prefix?|title?}}</pre>Creates a link to this page and this text, to easily reference this text - copy the URL of the (#) symbol to link directly to this text. Creates an anchor named "#prefix_name" and titled "title". Prefix defaults to "anchor", title defaults to name.<br>'''Example:'''<pre>{{Anchor|reference1}}</pre>results in {{Anchor|reference1}}<br><br></noinclude>
<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