Difference between revisions of "Template:Section link/doc"
From EVE University Wiki
(Remove some unneeded link markup) |
m (Rewrite doc.) |
||
Line 1: | Line 1: | ||
− | + | ; Description | |
− | + | : This template is used to generate a link to a certain section of a local wiki page and render an appropriate section mark (§). | |
− | |||
− | |||
− | |||
− | + | ; Syntax | |
+ | : {{T|Section link|article|section}} | ||
+ | :; Article : Name of the article to be linked to. For usage within the same article, leave the article position empty | ||
+ | :; Section : Name of the section to be linked to. | ||
− | + | ; Sample | |
− | + | : Instead of: | |
− | Instead of: | + | : {{Code|<nowiki>[[Gas cloud harvesting#Mykoserocin]]</nowiki>}} which gives... |
− | + | : [[Gas cloud harvesting#Mykoserocin]] | |
− | + | : ...you can write: | |
− | + | : {{Code|<nowiki>{{section link|cloud harvesting|Mykoserocin}}</nowiki>}} which gives... | |
− | [[ | + | : {{section link|Gas cloud harvesting|Mykoserocin}} |
− | |||
− | ...you can write: | ||
− | |||
− | |||
− | |||
− | {{section link| | ||
===Suppressing page name=== | ===Suppressing page name=== | ||
Sometimes the page name needs not to appear, e.g. to avoid redundancy and wordiness. For the page on which the template is used, not specifying a page name creates a section link only. The following: | Sometimes the page name needs not to appear, e.g. to avoid redundancy and wordiness. For the page on which the template is used, not specifying a page name creates a section link only. The following: | ||
− | < | + | : {{Code|<nowiki>{{Section link||Suppressing page name}}</nowiki>}} |
− | ...is the equivalent of: | + | : ...is the equivalent of: |
− | < | + | : {{Code|<nowiki>[[#Suppressing page name|§ Suppressing page name]]</nowiki>}} |
− | ...and renders as: | + | : ...and renders as: |
− | :{{section link||Suppressing page name}} | + | : {{section link||Suppressing page name}} |
<includeonly>[[Category:Link templates]]</includeonly> | <includeonly>[[Category:Link templates]]</includeonly> | ||
<noinclude>[[Category:Template documentation]]</noinclude> | <noinclude>[[Category:Template documentation]]</noinclude> |
Revision as of 17:05, 2 September 2022
- Description
- This template is used to generate a link to a certain section of a local wiki page and render an appropriate section mark (§).
- Syntax
- {{Section link|<article>|<section>}}
- Article
- Name of the article to be linked to. For usage within the same article, leave the article position empty
- Section
- Name of the section to be linked to.
- Sample
- Instead of:
which gives...[[Gas cloud harvesting#Mykoserocin]] - Gas cloud harvesting#Mykoserocin
- ...you can write:
which gives...{{section link|cloud harvesting|Mykoserocin}} - Gas cloud harvesting § Mykoserocin
Suppressing page name
Sometimes the page name needs not to appear, e.g. to avoid redundancy and wordiness. For the page on which the template is used, not specifying a page name creates a section link only. The following:
{{Section link||Suppressing page name}} - ...is the equivalent of:
[[#Suppressing page name|§ Suppressing page name]] - ...and renders as:
- § Suppressing page name