Template:See above

From MattWiki
Jump to: navigation, search

(See § [[#{{{1}}}|{{{1}}}]], above.)

Documentation icon Template documentation[view] [edit] [history] [purge]


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}}. (To change this, see parameter label, below.)

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: (See § Radical Whigs, below.)

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.


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] }}

With custom text

{{See above |pre=content before "See" |see=alternative to the word "See" |content=the content (link and any "above", etc., notes coded manually) |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 with 1= unless the content contains a =<code> character. It can be omitted when using <code class="nowrap" >|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, see parameter label, below.), 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, see § Discography, above.). Capitalization of first letter must be done manually if needed (it will be, unless |mid=y a.k.a. |lc=y</code> is set, or | is set).
  • |see= – Replaces the word "See" (or "see") with something else, e.g. "Detailed", "as defined", or "see also". Must be manually capitalized if needed (it usually will be). Examples: {{see above|see=Detailed|short=y}} gives: (Detailed above); {{See below|see=see also|Second campaign|mid=y}} gives: (see also § Second campaign, below)
  • |content= (a.k.a. |text=) – give custom text; this overrides many of the features described here (including |1= ... |4=, |also=, |label=, |at=, |comma=, but not |see=, |mid=, |pre=, or |post=). If you want something to link, you have to link it manually (or with {{section link|section name here}}), and if you want a word like "above" to be included, you have to add it.
  • |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: (See also § New Zealand, below.)
  • |label= – Changes the section symbol (§) to something else: {{see below|label=table|Comparative rates of exchange}} gives (See table Comparative rates of exchange, below.)
  • |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: (See 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" /> 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: (see 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: (See § 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: (See § Poultry, above, for chickens and other fowl.). A short example: {{See below|short=y|ps=for details}} gives: (see 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 (see § In South America, above) 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 (see above) 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 bar); {{see above|foo|at=baz|short=y}} gives (see baz), and this is intentional. The most concise use, which suppresses linking, is simply {{see above|short=y}}: (see above). The equivalents also work: {{see below|short=y}} for (see below); {{see at|at=table|short=y}} for (see table), etc. Equivalent to the last are {{see at|2=table|short=y}}, giving: (see table); and {{see at||table|short=y}}, giving: (see 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 with 3= unless the content contains a =<code> character, or <code class="nowrap" >|2= is not used.) Examples: {{see below|TV series|3=Film adaptation}} gives: (See §§ TV series and Film adaptation, below.); {{see above|Evolutionary psychology|Evolutionary|Social psychology}} gives: (See §§ Evolutionary and Social psychology, above.). 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: (See §§ Early life and career, and Political rise, reign, and assassination, below.)
    • |,= (a.k.a. |comma= – insert something other than a comma, such as a semicolon with |,=; or "as well as" with |,=&nbsp;as well as. Note that this parameter is mostly used for commas and semicolons, so if you want words, you have to add a hard space (&nbsp;) 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}}


(for terminology differences, consult also the list "Breed standards", in the infobox, for details)

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 also 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 at|text={{section link||Brazilian Jiujitsu}}, above, and {{section link||Jujutsu}}, below}}


(See § Brazilian Jiujitsu, above, and § Jujutsu, below.)


{{see at|Brazilian Jiujitsu|after=and §&thinsp;[[#Jujusu|Jujutsu]], below}}


(See § Brazilian Jiujitsu, above, and § Jujutsu, below.)


{{see at|Brazilian Jiujitsu|,=, above|3=Jujutsu}}


(See §§ Brazilian Jiujitsu, above, and Jujutsu, above.)

For even more complex cases (3 or more link targets, etc.), just use {{Crossreference|selfref=no|content here}} to make a custom cross-reference.