Difference between revisions of "Template:Section link"

From EVE University Wiki
Jump to: navigation, search
m
(Remove magic word {{FULLPAGENAME}} making the result a relative link instead of an absolute one.)
 
Line 1: Line 1:
<includeonly>[[{{#if: {{{1|}}} | {{{1}}} | {{FULLPAGENAME}} }}#{{{2}}}|{{{1|}}} &sect;&nbsp;{{{2}}}]]</includeonly><noinclude>
+
<includeonly>[[{{{1|}}}#{{{2}}}|{{{1|}}} &sect;&nbsp;{{{2}}}]]</includeonly><noinclude>
 
{{documentation}}
 
{{documentation}}
 
</noinclude>
 
</noinclude>

Latest revision as of 11:12, 29 August 2024

Template documentation (for the above template, sometimes hidden or invisible)
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:
[[Gas cloud harvesting#Mykoserocin]]
which gives...
Gas cloud harvesting#Mykoserocin
...you can write:
{{section link|cloud harvesting|Mykoserocin}}
which gives...
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
Visit Template:Section link/doc to edit this text! (How does this work?) (Refresh this text - why?)