टेम्पलेट:See section/doc
ई टेम्पलेट:See section के प्रलेखन उपपन्ना ह। इहाँ उपयोग खातिर जानकारी, श्रेणी सभ आ अउरी दूसर सामग्री मौजूद बा जेवन की मूल टेम्पलेट पन्ना के हिस्सा ना हवे। |
To quickly become familiar with this template, see § TemplateData (as usage summary), and § Examples. |
This template uses Lua: |
Template see section implements and formats links to properly wikimarked page sections and anchors in any single Wikipedia page. The template can handle up to four links of either type in any configuration, and may also link the page hosting the link targets. A range of supporting options is provided.
Usage
[संपादन करीं]Structure
[संपादन करीं]In this section, for presentation purposes only, required parameters are in bold; [square brackets] indicate parameter values; variables are italicized; explanatory text is in (parentheses).
|
|
Copy a blank version to use. All parameter names must be in lowercase. Use the "|" (pipe) character between each parameter. Delete unused parameters or options, and text in square brackets or parentheses (including brackets). See § Parameters for important details.
At least one section/anchor link is required; any mix of up to four such links in any single Wikipedia page may be utilized. When the link targets are not in the same page as the template, the links are normally followed by, in parentheses, the static text "in" and a wikilink to the page hosting the target anchor(s)/section(s). Undefined parameters are ignored; misspelled, empty or missing parameters display their default values, if any, or no value. Leading and trailing spaces ( ) are trimmed from parameter values; however, displayable values are separated by a single whitespace character. Appropriate punctuation may precede or follow this separator where relevant. There is no default trailing punctuation. Available options may override, enhance or extend template defaults. In most cases, usage errors will result in display of relevant error messages.
Applicability
[संपादन करीं]The template may be used wherever consistently formatted links to page sections or anchors are desirable; a recommended use is as part of a cross-reference – please see and .
Parameters
[संपादन करीं]A target section or target anchor (via anonymous parameter [1]) is required; some options may depend on other parameters or parameter properties. Incorrect parameter values will be flagged under almost all usage scenarios (see § Error messages).
Parameter names are in bold below, for presentation only.
Link parameters
[संपादन करीं]There are four anonymous, ordered link parameters, and one named link parameter. The anonymous parameters may display links to as many as four sections or anchors present in a single page – multiple such links are separated by comma(s), or joined by "and". The named parameter (page), may be used to display a link to the related page; the default value for this parameter is the source page (the page hosting the template).
Required:
- [1] (section|anchor): use the first anonymous parameter for the heading of an existing section or name of an existing anchor, which becomes a target section/target anchor. Note there is no validation for the user entry; misspelled or non-existent section/anchor links will display without error. Enter the section heading or anchor name in plain text – do not use any formatting or special editing (but see parameters sym[n][नोट 1] here, and txt[n][नोट 1] here). A value for this parameter is required.
Optional (values may be required by other options):
- [2] (2nd section|anchor): as [1] above; use the second anonymous parameter to link a second target section/target anchor in the relevant page.
- [3] (3rd section|anchor): as above; use the third anonymous parameter to link a third target section/target anchor in the relevant page.
- [4] (4th section|anchor): as above; use the fourth anonymous parameter to link a fourth target section/target anchor in the relevant page.
Suggested/implied:
- page: use this for the title of the page that includes the section(s) or anchor(s) to be linked (the target page); this parameter should be used when that page is other than the page that includes the template (the source page). The source page is the default value, and in such application the parameter should not be used or should be left empty; in any case, when the target section(s)/target anchor(s) are in the source page the parenthetical output will not display. Enter the title (including the namespace prefix, if any), in plain text – do not use any formatting or special editing (but see parameter italics).
- – for examples see under parameter [1]
- Note: while parameter page is normally ignored when it links the source page, other parameters may yet generate related page errors (example below).
Display parameters
[संपादन करीं]Conditional (require values for the corresponding anonymous target-link parameters):
- sym, sym2, sym3, sym4 (symbol): depending on the number of target sections or anchors, use any or all of these parameters to insert a section sign and non-breaking space (§ ) before each corresponding target-section link; or collectively, before all target-section links. Do not use for target-anchor links unless these are editor-inserted anchors that link target sections; in such cases also consider use of parameters txt[n] below.
- set
|sym=all
only when all targets link sections; a double section sign (§§ ) will appear before the first target-section link - set
|sym=y
and/or|sym2=y
and/or|sym3=y
and/or|sym4=y
to specifically apply before each corresponding target-section link
- set
Conditional (requires a target page value for parameter page):
- italics: set
|italics=y
to italicize the target-page link; do not use when parameter page refers to the source page. Use this parameter only when the target-page title is already rendered in italics (WP:TITLE). Parenthetical portions of page titles are excluded from formatting and render properly, in plain text.
- – for an example see here (includes other options)
- Note: parameter italics is unnecessary when {{see section}} is used in a श्रे:Cross-reference templates – such templates' output is italicized by default.
Conditional (requires a value for parameter post below):
- sep (separator): if you insert a postscript, you may use this parameter to add preceding punctuation, followed by a space.
- – for an example see here (includes other options)
Optional:
- term (termination): use this parameter to append trailing (terminating) punctuation to the template's output.
- – for an example see here (includes other options)
Other parameters
[संपादन करीं]Optional:
- pre (prepend): use this parameter to add brief informational text that displays before the target-section/target-anchor link(s).
- post (postscript): use this parameter to add brief informational text or link notes that display after the target-page link, or after the target-section/target-anchor link(s) (if these are in the source page). You may also use the dependent parameter sep above to add trailing punctuation to the preceding target link.
Conditional (require values for the corresponding anonymous target-link parameters):
- txt, txt2, txt3, txt4 (link text): if the target link(s) are non-visible anchor names, use any or all of these parameters to display descriptive text for the corresponding link(s), instead of the anchor name. Usage of these parameters is recommended when linking to editor-inserted anchors with abbreviated or non-contextual names. Do not use for target sections unless these are linked by editor-inserted anchors.
उदाहरण
[संपादन करीं]General usage
[संपादन करीं]Target section in target page
{{see section|page=History of Wikipedia|Timeline}}
- produces: Timeline (in History of Wikipedia)
Target section in source page
{{see section|Usage}}
or
{{see section|page=Template:See section|Usage}}
- either produce: Usage (in Template:See section)
Two target sections in source page
{{see section|Applicability|Expensive function}}
- produces: Applicability and Expensive function
Four target sections in target page
{{see section|page=History of Wikipedia|2000|2001|2002|2003}}
- produces: 2000, 2001, 2002 and 2003 (in History of Wikipedia)
With § symbol, in target page
{{see section|page=History of Wikipedia|Timeline|sym=y}}
- produces: § Timeline (in History of Wikipedia)
With §§ symbol, in target page
{{see section|page=History of Wikipedia|2000|2001|sym=all}}
- produces: §§ 2000 and 2001 (in History of Wikipedia)
With § symbol, both target types, in source page
{{see section|Usage|symbol|Other parameters|sym=y|sym3=y}}
- produces: § Usage, symbol and § Other parameters
Target-page title in italics, § symbol, and prepended text
{{see section|pre=Also see|page=Star Wars|Box office performance|sym=y|italics=y}}
- produces: Also see § Box office performance (in Star Wars)
Terminating punctuation, postscript, target-anchor link in source page
{{see section|symbol|post=in this page|term=;}}
- produces: symbol in this page;
With prepended text, section linked by target anchor, link text, and § symbol, in target page
{{see section|pre=See|page=Help:Contents|gethelp|txt=Stuck?|sym=y}}
- produces: See § Stuck? (in Help:Contents)
Two target anchors with link text, in source page
{{see section|symbol|ital|txt=sym|txt2=italics}}
Cross-referencing usage
[संपादन करीं]The following examples embed {{see section}} in {{xref}} and {{further2}}; for additional cross-reference templates see the श्रे:Cross-reference templates.
Also see note under parameter italics.
As a sentence, with prepended text, postscript, separating punctuation, and terminating punctuation, in target page
{{crossref|{{see section|pre=See|page=Greece|History|sep=,|post=for more information|term=.}}}}
- produces:
Inline in sentence, with prepended text and § symbol, in target page
... {{crossref|({{see section|pre=detailed at|page=Greece|History|sym=y}})}}.
- produces: ... .
Inline in a hatnote, references target page
{{further2|{{see section|page=Greece|History}}}}
- produces the hatnote:
Error messages
[संपादन करीं]Multiple errors are flagged per parameter; errors involving the same parameter may be mutually exclusive. Error messages may also appear conditionally, depending on the use of particular options; for example, when a third target section link is not defined, adding a symbol sign for the section (via parameter sym3), will produce a "link required" error even if correct (|sym3=y
).
Messages replace the relevant parameter value(s), and appear in the following cases:[नोट 2]
Parameter [1]
- First target-section/target-anchor link is missing: [error in template
{{see section}}
: the first target-section/target-anchor link is required]
Parameters [3], [4]
- Intermediate target-section/target-anchor link is empty: [error in template
{{see section}}
: missing intermediate n target-section/target-anchor link] [नोट 1]
Parameter sym
- Multiple target links required: [error in template
{{see section}}
: double section sign requires multiple target-section links] - Incorrect entry: [error in template
{{see section}}
: symbol option with wrong value]
Parameters sym2, sym3, sym4
- Incorrect entry: [error in template
{{see section}}
: symbol option for the n target-section link with wrong value] [नोट 1] - Corresponding target link required: [error in template
{{see section}}
: n target-section symbol requires n target-section link] [नोट 1]
Parameters txt2, txt3, txt4
- Corresponding target link required: [error in template
{{see section}}
: n target-anchor text requires n target-anchor link] [नोट 1]
Parameter italics
- No target-page link specified, or source page: [error in template
{{see section}}
: italics option requires a target-page link] - Incorrect entry: [error in template
{{see section}}
: italics option with wrong value]
TemplateData
[संपादन करीं]TemplateData for see section
This template implements and formats wikilinks to as many as four pre-existing sections or anchors of a single Wikipedia page, and to the page itself. Link targets may be any mix of sections and anchors. Recommended in cross-referencing applications.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Section|Anchor | 1 | Heading of an existing target section or name of an existing target anchor at any Wikipedia page
| String | required |
Second section|anchor | 2 | Second pre-existing section or anchor in the same page; may be required by other options
| String | optional |
Third section|anchor | 3 | Third pre-existing section or anchor in the same page; may be required by other options | String | optional |
Fourth section|anchor | 4 | Fourth pre-existing section or anchor in the same page; may be required by other options | String | optional |
Page | page | Title of page that contains the section(s) or anchor(s) to be linked (target page); leave blank if the sections or anchors are in the page hosting the template (the source page); a target-page link may be required by other options
| Page name | suggested |
Symbol | sym | Set to "all" to display a double section sign (indicating multiple sections), requires multiple target links; or set to "y" to insert a single section sign; either appear before the first target link; for section links only; do not use for editor-inserted anchors unless these link target sections
| String | optional |
Symbol 2 | sym2 | Set to "y" to insert the section sign before the second target link; for section links only; do not use for editor-inserted anchors unless these link target sections; requires corresponding target link
| Boolean | optional |
Symbol 3 | sym3 | Set to "y" to insert the section sign before the third target link; for section links only; do not use for editor-inserted anchors unless these link target sections; requires corresponding target link
| Boolean | optional |
Symbol 4 | sym4 | Set to "y" to insert the section sign before the fourth target link; for section links only; do not use for editor-inserted anchors unless these link target sections; requires corresponding target link
| Boolean | optional |
Prepend | pre | Use to add brief informational text; appears before the target link(s)
| String | optional |
Link text | txt | Descriptive text for the first target link; for anchor links only; do not use for visible anchors; do not use for target sections unless these are linked by editor-inserted anchors
| String | optional |
Link text 2 | txt2 | Descriptive text for the second target link; for anchor links only; do not use for visible anchors; do not use for target sections unless these are linked by editor-inserted anchors; requires corresponding target link
| String | optional |
Link text 3 | txt3 | Descriptive text for the third target link; for anchor links only; do not use for visible anchors; do not use for target sections unless these are linked by editor-inserted anchors; requires corresponding target link
| String | optional |
Link text 4 | txt4 | Descriptive text for the fourth target link; for anchor links only; do not use for visible anchors; do not use for target sections unless these are linked by editor-inserted anchors; requires corresponding target link
| String | optional |
Italics | italics | When set to "y", it renders the target-page link in italics; requires a target-page link; use only when the target page title is already italicized; avoid using when this template is used in a cross-reference template
| Boolean | optional |
Postscript | post | Use to add informational text that appears after the link to the target page (or after the target section/anchor links if these are in the source page)
| String | optional |
Separator | sep | Use to add punctuation that appears before a postscript; a space automatically follows the punctuation; requires use of 'Postscript'
| String | optional |
Terminator | term | Use to append trailing (terminating) punctuation
| String | optional |
इहो देखल जाय
[संपादन करीं]- {{section link}} – alternate, also links to multiple sections
- {{multi-section link}} – adds links to nested sections
Footnotes
[संपादन करीं]