आकृति:Pagelist/doc
This is a documentation subpage for आकृति:Pagelist. It contains usage information, categories and other content that is not part of the original आकृति page. |
This template uses Lua: |
Usage
सम्पादन करीThis template creates a comma-separated list of pages formatted as links. The last two pages in the list are separated by "and" instead of a comma. Any number of pages may be included in the list.
By default, the namespace of the page including this template is used for each of the links. An optional 'nspace'
parameter can be specified to provide a different namespace to use for the links.
Two other optional parameters are supported to provide formatting of the page links. If specified, the delim
parameter is included before and after each page name. Optionally, the edelim
parameter can specify the delimiter used at the end of the page name—in this case the delim
tag is still used for the beginning of the page name.
It is possible to specify a custom separator (instead of a comma) using the separator
parameter. It is also possible to specify a custom value to use instead of "and" before the final item using the conjunction
parameter. For both of these parameters, there are special values that use the default separators for the language set in users' preferences: dot
( ·
), pipe
( |
), comma
(,
), or tpt-languages
(⧼tpt-languages-separator⧽
).
This template is mostly useful from within other templates that accept a variable number of page names as arguments. For example, the page arguments {{{1}}}
–{{{10}}}
can be passed to this template using {{pagelist|{{{1|}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}|{{{6|}}}|{{{7|}}}|{{{8|}}}|{{{9|}}}|{{{10|}}}}}
. Any parameters not specified to the original template will be passed as empty parameters and not listed by the pagelist template.
Examples
सम्पादन करीType this | To get this |
---|---|
{{Pagelist|X1|X2|X3|X4|X5}}
|
X1, X2, X3, X4 आर X5 |
{{Pagelist|nspace=Template|X1|X2|X3|X4|X5}}
|
X1, X2, X3, X4 आर X5 |
{{Pagelist|nspace= |delim=''|X1|X2|X3|X4|X5}}
|
[[::X1|X1]], [[::X2|X2]], [[::X3|X3]], [[::X4|X4]] आर [[::X5|X5]] |
Parameters
सम्पादन करीSee the monthly error report for this template.
TemplateData for Pagelist
This template creates a comma-separated list of pages formatted as links. The last two pages in the list are separated by "and" instead of a comma. Any number of pages may be included in the list.
पैरामीटर | विवरण | प्रकार | स्थिति | |
---|---|---|---|---|
Namespace | nspace | Namsespace on which the page is located, without the trailing colon (":"). Acceptable values are "Talk", "File", "File talk", "Category", "Category talk", "Help", "Help talk", "Wikipedia", "Wikipedia talk", "Portal", "Portal talk", "Template", "Template talk", "Module", "Module talk", "User", "User talk", and anything added in the future.
| स्ट्रिंग | वैकल्पिक |
Prefix (starting delimiter) | delim | Wikicode to insert before each page name. Default is nothing. If this parameter is specified and no suffix parameter is specified, the contents of this parameter would also be used as the suffix. | असंतुलित विकिटेक्स्ट | वैकल्पिक |
Suffix (ending delimiter) | edelim | Wikicode to insert after each page name. If not specified, the default is the value of the prefix parameter. | असंतुलित विकिटेक्स्ट | वैकल्पिक |
Separator | separator | The character(s) used to separate specified page names, excluding the last two. Default is comma.
| स्ट्रिंग | वैकल्पिक |
Conjunction | conjunction | The character(s) used to separate the last two items. Default is "and".
| स्ट्रिंग | वैकल्पिक |
Page name 1 | 1 | कोई विवरण नहीं | असंतुलित विकिटेक्स्ट | वैकल्पिक |
Page name 2 | 2 | कोई विवरण नहीं | असंतुलित विकिटेक्स्ट | वैकल्पिक |
Page name 3 | 3 | कोई विवरण नहीं | असंतुलित विकिटेक्स्ट | वैकल्पिक |
Page name 4 | 4 | कोई विवरण नहीं | असंतुलित विकिटेक्स्ट | वैकल्पिक |
Page name 5 | 5 | कोई विवरण नहीं | असंतुलित विकिटेक्स्ट | वैकल्पिक |
Page name 6 | 6 | कोई विवरण नहीं | असंतुलित विकिटेक्स्ट | वैकल्पिक |
Page name 7 | 7 | कोई विवरण नहीं | असंतुलित विकिटेक्स्ट | वैकल्पिक |
Page name 8 | 8 | कोई विवरण नहीं | असंतुलित विकिटेक्स्ट | वैकल्पिक |
Page name 9 | 9 | कोई विवरण नहीं | असंतुलित विकिटेक्स्ट | वैकल्पिक |
Page name 10 | 10 | कोई विवरण नहीं | असंतुलित विकिटेक्स्ट | वैकल्पिक |
See also
सम्पादन करीModule:Pagelist, the Lua module this template is based on