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  





2 Examples  





3 Error checking  





4 Tracking categories  





5 See also  














Template:Category pair






العربية

Авар

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

Cymraeg
Ελληνικά
Español
فارسی
  / Gõychi Konknni

Հայերեն
Bahasa Indonesia

ि
Македонски
Bahasa Melayu


 
ି
Oʻzbekcha / ўзбекча

پښتو
Português
Română
Scots

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


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
Wikiversity
 
















Appearance
   

 





Permanently protected template

From Wikipedia, the free encyclopedia
 


Usage

Typical usage should be on dissimilar preceding/succeeding categories, or where a large gap exists in otherwise sequential categories. For similarly named sequential categories with gaps less than 5 years, use {{Category series navigation}} instead, and {{Category series navigation|skip-gaps=yes}} for gaps up to 15 years from the parent.

{{Category pair|NAME1|NAME2}}
at the top of the category page. Each category is displayed only if it exists. If neither category exists, nothing will be displayed.
{{Category pair|NAME1}}
at the top of the category page.
{{Category pair||NAME2}}
at the top of the category page.

Examples

Preceding and succeeding categories, both exist
Preceding category only, which exists
Succeeding category only, which exists
Preceding and succeeding categories, only preceding exists
Preceding and succeeding categories, only succeeding exists
Two non-existent categories, so no output

Error checking

Only the first two parameters are processed, others are ignored.

If more than two parameters are supplied, a warning message is shown when the page is previewed. When it is saved, the page is added to the hidden tracking category: Category:Pages using category pair with more than 2 parameters.

If more than two parameters are supplied, the template is unlikely to do what the editor intended. For Category:NAME1, Category:NAME2, and Category:NAME3, for example:

Tracking categories

If neither parameter is a category which currently exists the template will produce no output. This is not necessarily an error; the other categories may simply be part of an incomplete series which will be completed in due course
See above: Error checking

See also


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

Categories: 
Lua-based templates
Internal category-link templates
Hatnote templates for category pages
Hidden categories: 
Wikipedia template-protected templates
Templates that add a tracking category
 



This page was last edited on 17 December 2021, at 06:46 (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