Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 Usage  



1.1  Examples  







2 Parameters  





3 See also  














Template:Pagelist






Afrikaans
Аԥсшәа
العربية
Arpetan

Asturianu
تۆرکجه
Basa Bali

 / Bân-lâm-gú
Беларуская (тарашкевіца)

Български
Bosanski
Català
Čeština
Cymraeg
Dansk
Ελληνικά
Español
Esperanto
فارسی
Føroyskt
Français
Galego


Հայերեն
ि
Igbo
Bahasa Indonesia
Italiano
Jawa
Kapampangan

Қазақша
Latviešu
Lietuvių
ि
Македонски



مصرى

 / Mìng-dĕ̤ng-nḡ
Мокшень


 

Norsk bokmål
Occitan
ି
Oʻzbekcha / ўзбекча



Português
Română
Sakizaya

Simple English
Slovenčina
Slovenščina
Soomaaliga
کوردی
Српски / srpski
Svenska
Tagalog
Taqbaylit
 


Тоҷикӣ
Türkçe
Українська
اردو
Tiếng Vit


 

Edit links
 









Template
Talk
 

















Read
View source
View history
 








Tools
   


Actions  



Read
View source
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Get shortened URL
Download QR code
Wikidata item
 




Print/export  



Download as PDF
Printable version
 




In other projects  



Wikimedia Commons
MediaWiki
Wikiversity
 
















Appearance
   

 





Permanently protected template

From Wikipedia, the free encyclopedia
 


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. |nspace=all Makes the parameters namespace-aware, i.e. not default to the mainspace.

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, up to twenty pages, 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 and X5
{{Pagelist|nspace=Template|X1|X2|X3|X4|X5}} X1, X2, X3, X4 and X5
{{Pagelist|nspace= |delim=''|X1|X2|X3|X4|X5}} X1, X2, X3, X4 and X5
{{Pagelist|nspace=all|delim=''|Portal:Birds|Wikipedia:Template editor}} Portal:Birds and Wikipedia:Template editor
{{Pagelist|X1}} X1
{{Pagelist}}
{{Pagelist|X1|X2|X3|separator=;}} X1;X2 and X3
{{Pagelist|X1|X2|X3|separator=; }} X1; X2 and X3
{{Pagelist|X1|X2|X3|conjunction=or}} X1, X2orX3
{{Pagelist|X1|X2|X3|conjunction= or }} X1, X2 or X3

Parameters

This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Pagelist in articles based on its TemplateData.

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.

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Namespacenspace

Namespace 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. "all" allows specifying lists of pages from multiple namespaces

Example
Template
Stringoptional
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.

Unbalanced wikitextoptional
Suffix (ending delimiter)edelim

Wikicode to insert after each page name. If not specified, the default is the value of the prefix parameter.

Unbalanced wikitextoptional
Separatorseparator

The character(s) used to separate specified page names, excluding the last two. Default is comma.

Example
;
Stringoptional
Conjunctionconjunction

The character(s) used to separate the last two items. Default is "and".

Example
or
Stringoptional
Page name 11

no description

Unbalanced wikitextoptional
Page name 22

no description

Unbalanced wikitextoptional
Page name 33

no description

Unbalanced wikitextoptional
Page name 44

no description

Unbalanced wikitextoptional
Page name 55

no description

Unbalanced wikitextoptional
Page name 66

no description

Unbalanced wikitextoptional
Page name 77

no description

Unbalanced wikitextoptional
Page name 88

no description

Unbalanced wikitextoptional
Page name 99

no description

Unbalanced wikitextoptional
Page name 1010

no description

Unbalanced wikitextoptional

See also


Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:Pagelist&oldid=810671221"

Categories: 
Lua-based templates
List formatting and function templates
Internal link templates
Hidden categories: 
Wikipedia template-protected templates
Templates using TemplateData
 



This page was last edited on 16 November 2017, at 18:39 (UTC).

Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



Privacy policy

About Wikipedia

Disclaimers

Contact Wikipedia

Code of Conduct

Developers

Statistics

Cookie statement

Mobile view



Wikimedia Foundation
Powered by MediaWiki