Šablon:See above/dok
Ovo je dokumentaciona podstranica za Šablon:See above. Sadrži informacije o korišćenju, kategorijama i drugom sadržaju koji nije deo originalne stranice. |
Usage
[uredi izvor]The templates {{See above}} (a.k.a. {{See at}}, which defaults to "above"), and {{See below}} (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}}.
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 Module:Hatnote-inline.
- Basic usage
{{See below|Radical Whigs)}}
produces:
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
[uredi izvor]- 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: , 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).
is set, or|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 . Capitalization of first letter must be done manually if needed (it will be, unless|mid=y
a.k.a.|lc=y
|
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: ;{{See below|see=see also|Second campaign|mid=y}}
gives:|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:|label=
– Changes the section symbol (§) to something else:{{see below|label=table|Comparative rates of exchange}}
gives|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: . 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" />
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: .|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:
|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: . A short example:{{See below|short=y|ps=for details}}
gives: . 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 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 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 ;{{see above|foo|at=baz|short=y}}
gives , and this is intentional. The most concise use, which suppresses linking, is simply{{see above|short=y}}
: . The equivalents also work:{{see below|short=y}}
for ;{{see at|at=table|short=y}}
for , etc. Equivalent to the last are{{see at|2=table|short=y}}
, giving: ; and{{see at||table|short=y}}
, giving: . 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: ;{{see above|Evolutionary psychology|Evolutionary|Social psychology}}
gives: . 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:|,=
(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:
{{see at|pre=for terminology differences|see=consult|also=y|label=the list|ibbs|"Breed standards"|at=in the infobox|post=for details|mid=y}}
gives:
However this would be so silly as to be minnow-worthy, since the following achieves the same result:
{{Crossreference|selfref=no|(for terminology differences, consult the list [[#ibbs|"Breed standards"]], in the infobox, for details)}}
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:
{{see below|Brazilian Jiujitsu|,=, above|3=Jujutsu}}
giving:
or
{{see above|label=§§|Brazilian Jiujitsu|after=and [[#Jujusu|Jujutsu]], below}}
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.