Skabelon:Se herover/doc
Dette er dokumentationsundersiden til Skabelon:Se herover. Denne side indeholder information om brug, kategorier samt andet indhold, som ikke er en del af den oprindelige skabelonside. |
Brug
[rediger kildetekst]The templates {{Se herover}} (a.k.a. {{See at}}, which defaults to "above"), and {{Se herunder}} (which changes "above" to "below") will format text into a standardized style for an inline (not block-level) crossreference to other content in the same article, either above or below the insertion point of the template, respectively.
The template automatically creates the link to the in-page anchor, without addition of [[# ... ]]
markup around the target. It also auto-formats the output into its own round-bracketed parenthetical sentence, italicized like other block-format and inline hatnotes and crossreferences. (Sentence display can be suppressed, but brackets cannot). By default, it expects to link to a section name, and prepends the section symbol (§) before the section name, as does {{Section link}}. (To change this, se parameter label
, herunder.)
When cross-referencing something other than a section (the heading for which is a link anchor), an anchor must be manually inserted, e.g. with the {{anchor}} template, so that the template has something to which to link.
They are not Wikipedia self-references, but self-references to the content at hand, and are thus printworthy. Their output is ultimately generated by Modul:Hatnote-inline.
- Basic usage
{{See below|Radical Whigs)}}
produces: (Se § Radical Whigs, herunder.)
Technical limitation: MediaWiki provides no means of checking that #-anchor link targets are valid. It is advisable to add an HTML comment like <!--This section/anchor linked to from [location].-->
after any heading or other anchor to which such a template links, so that cleanup after renaming the heading/anchor is easy.
Parameters
[rediger kildetekst]- All parameters
{{See above |pre=content before "See" |see=alternative to the word "See" |also=y [add "also" after "See"] |label=alternative to section character |1=anchor to link |2=piped link text |,=y [insert a comma here]|3=anchor to 2nd link |4=piped 2nd link text |at=alternative to "above/below"
|post=content after "above/below"
|mid=y [mid-sentence use]
|small=y [concise output] }}
This template accepts the following parameters:
|1=
(a.k.a. first unnamed parameter) – The cross-reference anchor name. Normally required, but need not be specified with1=
unless the content contains a=
character. It can be omitted when using|short=
, to suppress linking.|2=
(a.k.a. second unnamed parameter) – A link may be piped and its displayed wording changed to the content in this parameter. This documentation page itself does this: The code{{see below|pre=To change this|label=parameter|Parameters|<code>label</code>}}
produces: (To change this, se parameterlabel
, herunder.), but links to the heading (anchor)#Parameters
. In normal use, this does nothing without|1=
, but can be used alone with|short=
to suppress linking and to replace "above"/"below" (it is more intuitive to do this with|at=
, however).
|pre=
(a.k.a.|before=
) – Add text before "See" (also lower-cases "See" to "see" and introduces a comma before it):{{see above|pre=For track listing|Discography}}
gives (For track listing, se § Discography, herunder.). Capitalization of first letter must be done manually if needed (it will be, unless|mid=y
a.k.a.|lc=y
is set, or|
is set).|see=
– Replaces the word "See" (or "see") with something else, e.g. "Detailed" or "see also". Must be manually capitalized if needed (it usually will be). Examples:{{see above|see=Detailed|short=y}}
gives: (Detailed below);{{See below|see=see also|Second campaign|mid=y}}
gives: (see also § Second campaign, herunder)|also=y
(or with any other value such as=yes
) – Another way of getting "See also" (or "see also"): It adds the word "also" after "See" (or "see", or the value of|see=
):{{see below|also=y|New Zealand}}
gives: (Se også § New Zealand, herunder.)|label=
– Changes the section symbol (§) to something else:{{see below|label=table|Comparative rates of exchange}}
gives (Se table Comparative rates of exchange, herunder.)|at=
– Replace "above" (or "below") with some other location, e.g. "in sidebar", "in table", etc. The default is "above". The parameter name is easy to remember if you also use the{{see at}}
shortcut of the template: the code{{see at|label=the list|ibbs|"Breed standards"|at=in the infobox}}
yields: (Se the list "Breed standards", in the infobox.). It is necessary that an anchor exist for the link (e.g., in the previous example, the infobox template must have{{anchor|ibbs}}
or<span id="ibbs"></span>
at the beginning of its "Breed standards" header). Display of any link (along with any value of|label=
) can be suppressed with a particular use of|short=
with|at=
:{{see at|at=the list "Breed Standards" in the infobox}}
yields: (se the list "Breed Standards" in the infobox).|at=n
(or any negative value such as=no
,=false
,=0
) or|at=
(with empty value) – suppress display of "above"/"below". Example:{{see at|History, 2010–2015|at=no}}
gives: (Se § History, 2010–2015.)
|post=
(a.k.a.|ps=
, a.k.a.|after=
) – Add text following "above" (or "below", or the value of|at=
). Typical example:{{see above|Poultry|post=for chickens and other fowl}}
gives: (Se § Poultry, herunder, for chickens and other fowl.). A short example:{{See below|short=y|ps=for details}}
gives: (se below for details). Note that it leaves out the comma when|short=y
is set.|mid=y
or|lc=y
(or with any other value such as=yes
) – For mid-sentence use; this lower-cases "See" to "see", and removes the period (full stop) at end of the construction:{{see above|In South America|mid=y}}
produces (se § In South America, herunder) in mid-sentence.|short=y
(or with any other value such as=yes
) – Compresses the entire entry to just link "above" (or "below", or the value of|2=
, or the value given in|at=
, as applicable) to the anchor, and formats as per the|mid=y
parameter. E.g.{{see above|2013|short=y}}
yields (se below) in mid-sentence. The value of|2=
trumps that of|at=
, and the use of either will override the default "above" or "below":{{see above|foo|bar|at=baz|short=y}}
gives (se bar);{{see above|foo|at=baz|short=y}}
gives (se baz), and this is intentional. The most concise use, which suppresses linking, is simply{{see above|short=y}}
: (se below). The equivalents also work:{{see below|short=y}}
for (se below);{{see at|at=table|short=y}}
for (se table), etc. Equivalent to the last are{{see at|2=table|short=y}}
, giving: (se table); and{{see at||table|short=y}}
, giving: (se table). This feature is principally for use within the same section, where a link would be pointless. Because it is intended for abbreviated display, use of this parameter suppresses the output of any additional link provided with|3=
, etc.|3=
(a.k.a. third unnamed parameter) – An additional cross-reference anchor name. (Need not be specified with3=
unless the content contains a=
character, or|2=
is not used.) Examples:{{see below|TV series|3=Film adaptation}}
gives: (Se §§ TV series og Film adaptation, herunder.);{{see above|Evolutionary psychology|Evolutionary|Social psychology}}
gives: (Se §§ Evolutionary and Social psychology, herunder.). This parameter (and|4=
) are suppressed by use of|short=
.|4=
(a.k.a. fourth unnamed parameter) – The additional cross-reference link in|3=
may be piped and its displayed wording changed to the content in this parameter. Without|3=
it does nothing.|,=y
(a.k.a.|comma=y
; or with any other positive value such as=yes
or=true
or=1
) – insert a comma between the two links; this is only needed when one or more of the links is complex (e.g. contains "and" or a comma) and makes the construction hard to parse without separating the two links more explicitly:{{see below|Early life and career|,=y|3=Political rise, reign, and assassination}}
gives: (Se §§ Early life and career, og Political rise, reign, and assassination, herunder.)|,=
(a.k.a.|comma=
– insert something other than a comma, such as a semicolon with|,=;
or "as well as" with|,= as well as
. Not that this parameter is mostly used for commas and semicolons, so if you want words, you have to add a hard space before the first word.
A contrived complex case illustrating most features at once:
gives:
However this would be so silly as to be minnow-worthy, since the following achieves the same result:
and we wouldn't use something that long-winded anyway.
For both-above-and-below references (which should normally be avoided), these tricks can be used:
giving:
or
giving:
For even more complex cases (3 or more link targets, etc.), just use {{Crossreference|selfref=no|content here}}
to make a custom cross-reference.