Template:Anchor/doc: Difference between revisions
No edit summary |
(update to Lua, should no longer be limited to ten anchors) |
||
Line 1: | Line 1: | ||
{{Lua| |
|||
* [[Module:Anchor]]}} |
|||
==Description== |
==Description== |
||
This creates one or more HTML anchors |
This creates one or more HTML anchors so you can jump to where this template appears with <code><nowiki>[[</nowiki></code>''pagename''<code>#</code>''anchorname''<code><nowiki>]]</nowiki></code>. The result of the template should not be visible on the page. |
||
==Syntax== |
==Syntax== |
||
Type <code>{{t|Anchor|anchorname1|... |
Type <code>{{t|Anchor|anchorname1|anchorname2|anchorname3|...}}</code> somewhere. |
||
==Example== |
==Example== |
||
Line 53: | Line 54: | ||
==Credits== |
==Credits== |
||
The template code was taken from the [[ |
The template's Lua code was taken from the [[w:en:Template:Anchor|English Wikipedia]]. |
||
A non-Lua version of the template was formerly used [https://www.thesimswiki.com/w/index.php?title=Template:Anchor&oldid=1644 here]. That code was taken from the [[wikia:w:c:templates:Template:Anchor|Templates Wiki]] on Wikia. |
|||
==TemplateData== |
==TemplateData== |
||
Line 59: | Line 62: | ||
<templatedata> |
<templatedata> |
||
{ |
{ |
||
"description": "This template inserts one or more HTML anchors in a page, which can then be linked to using [[#location|...]] syntax, or by going to https:// |
"description": "This template inserts one or more HTML anchors in a page, which can then be linked to using [[#location|...]] syntax, or by going to https://www.thesimswiki.com/Name_of_page#Anchor_title. This is useful when you need to link to very specific parts in an article.", |
||
"params": { |
"params": { |
||
"1": { |
"1": { |
Revision as of 12:26, 19 June 2019
Description
This creates one or more HTML anchors so you can jump to where this template appears with [[
pagename#
anchorname]]
. The result of the template should not be visible on the page.
Syntax
Type {{Anchor|<anchorname1>|<anchorname2>|<anchorname3>|<...>}}
somewhere.
Example
{{Anchor|jumphere}}
→- .
- .
- .
- .
- .
- .
- .
- .
- .
- .
- .
- Click me to jump to anchor.
Limitations
Character | Code | Template | Meaning |
---|---|---|---|
" | " "
|
N/A | (double) quotation mark |
# | #
|
N/A | hash |
| | |
|
{{!}} | pipe |
= | =
|
{{=}} | equals |
The characters listed on the right will cause problems with the template and should not be used. If you need to use them, replace them with the HTML character code provided. For example, if you need to use quotation marks, substitute them with "
or "
.
Alternatively, if you need to use pipe (|) or equal sign (=) characters, you may use the {{!}} and {{=}} templates, respectively, to use them.
Credits
The template's Lua code was taken from the English Wikipedia.
A non-Lua version of the template was formerly used here. That code was taken from the Templates Wiki on Wikia.
TemplateData
TemplateData for Anchor
This template inserts one or more HTML anchors in a page, which can then be linked to using [[#location|...]] syntax, or by going to https://www.thesimswiki.com/Name_of_page#Anchor_title. This is useful when you need to link to very specific parts in an article.
Parameter | Description | Type | Status | |
---|---|---|---|---|
First anchor | 1 | First anchor value. | String | required |
Second anchor | 2 | Second anchor value. | String | optional |
Third anchor | 3 | Third anchor value. | String | optional |
Fourth anchor | 4 | Fourth anchor value. | String | optional |
Fifth anchor | 5 | Fifth anchor value. | String | optional |
Sixth anchor | 6 | Sixth anchor value. | String | optional |
Seventh anchor | 7 | Seventh anchor value. | String | optional |
Eight anchor | 8 | Eight anchor value. | String | optional |
Ninth anchor | 9 | Ninth anchor value. | String | optional |
Tenth anchor | 10 | Tenth anchor value. | String | optional |