Difference between revisions of "Template:Section link/doc"

From EVE University Wiki
Jump to: navigation, search
(Added categories.)
m (Fix typo.)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<noinclude>{{main|Template:Section link}}</noinclude>
+
; Description
== Usage ==
+
: This template is used to generate a link to a certain section of a local wiki page and render an appropriate section mark (&sect;).
=== Syntax (overview) ===
 
* <code><nowiki>{{section link|Article|Section}}</nowiki></code>, link to section of other article. → Example: {{section link|Missioning 101|Class Contents}}
 
* <code><nowiki>{{section link||Section}}</nowiki></code>, for usage within the same article, leave the 2nd position empty → Example: {{section link||Class Contents}}
 
  
=== Single section ===
+
; 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.
  
This template, {{tl|section link}}, is used to generate a link to a certain section of a local wiki page and render an appropriate section mark ([[§]]).
+
; Sample
 +
: 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}}
  
Instead of:
+
=== 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:
<code><nowiki>[[Missioning 101#Class Contents]]</nowiki></code>
+
: {{Code|<nowiki>{{Section link||Suppressing page name}}</nowiki>}}
 
+
: ...is the equivalent of:
[[Missioning 101#Class Contents]]
+
: {{Code|<nowiki>[[#Suppressing page name|Suppressing page name]]</nowiki>}}
 
+
: ...and renders as:
...you can write:
+
: {{section link||Suppressing page name}}
  
<code><nowiki>{{section link|Missioning 101|Class Contents}}</nowiki></code>
 
  
{{section link|Missioning 101|Class Contents}}
+
<includeonly>[[Category:Link templates]]</includeonly>
 
 
===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:
 
<pre>{{Section link||Suppressing page name}}</pre>
 
...is the equivalent of:
 
<pre>[[#Suppressing page name|§ Suppressing page name]]</pre>
 
...and renders as:
 
:{{section link||Suppressing page name}}
 
<includeonly>[[Category:Template]]</includeonly>
 
 
<noinclude>[[Category:Template documentation]]</noinclude>
 
<noinclude>[[Category:Template documentation]]</noinclude>

Latest revision as of 08:25, 20 May 2024

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