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 See also  














Template:Suppress categories







Dansk
فارسی
Ilokano
Bahasa Indonesia





Português

Simple English
Slovenščina


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
Wikifunctions
Wikisource
Wikiversity
 
















Appearance
   

 





Permanently protected template

From Wikipedia, the free encyclopedia
 


  • {{suppresscats}}
  • {{stripcats}}
  • {{supcat}}
  • This template strips categories from wikitext. For example, if passed the code "foo[[Category:Some category]]", it will return only "foo". It can be used to strip categories from templates as well; if passed the code "{{my template}}", it will return the template output minus the categories.

    The template properly handles categories escaped with the colon trick, categories whose names include invalid characters such as ">", and categories that are surrounded with nowiki tags. However, it does not support complex wikitext such as nested links or magic words like __TOC__. Even so, it should still remove the vast majority of categories from any given wikitext.

    Usage

    {{suppress categories|''input text''}}
    

    Examples

    Code Output
    {{suppress categories|foo}} foo
    {{suppress categories|foo[[Category:Some category]]}} foo
    {{suppress categories|foo[[Category:Some category]]bar[[Category:Another category]]}} foobar
    {{suppress categories|foo{{{some_parameter|[[Category:Bar]]}}}}} foo
    {{suppress categories|foo[[Category:Bad ca[]tegory link]]}} foo[[Category:Bad ca[]tegory link]]
    {{suppress categories|foo[[:Category:Colon trick]]}} fooCategory:Colon trick
    {{suppress categories|foo[[Category:Piped link|bar]]}} foo
    {{suppress categories|foo[[Category:Piped link|ba[]r]]}} foo
    {{suppress categories|foo[[non-category link]]}} foonon-category link
    {{suppress categories|foo[[ Category : Some category with spaces ]]}} foo
    {{suppress categories|{{User alternative account name|Example}}}}
    This user has an alternative account named Example.

    See also


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

    Categories: 
    Lua-based templates
    Wikipedia categorization
    Hidden category: 
    Wikipedia extended-confirmed-protected templates
     



    This page was last edited on 26 November 2022, at 18:00 (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