From WikiChip
Difference between revisions of "Template:url parse anchor"

Line 1: Line 1:
<includeonly>{{#ifeq: {{#pos:{{{1}}}|#}} | 0 | /* nothing */ | {{#sub: {{{1}}} | {{#expr:{{#pos:{{{1}}}|#}} + 1}} }} }}</includeonly><noinclude>{{Url parse anchor/Doc}}
+
<includeonly>{{#if: {{#pos:{{{1}}}|#}} | | {{#sub: {{{1}}} | {{#expr:{{#pos:{{{1}}}|#}} + 1}} }} }}</includeonly><noinclude>{{Url parse anchor/Doc}}
 
</noinclude><noinclude>[[Category:templates]]</noinclude>
 
</noinclude><noinclude>[[Category:templates]]</noinclude>

Revision as of 20:31, 23 July 2014

Template documentation


Returns the anchor part of a link.

Usage

{{Url parse anchor| Link }}

Example

"{{Url parse anchor|ABC}}" vs "{{Url parse anchor|ABC#Anchor}}"
"" vs "Anchor"