Template:Suppress categories/doc: Difference between revisions
Template page
More actions
cleanup |
use TemplateData |
||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
{{Lua|Module:Suppress categories}} | |||
{{TemplateBox | {{TemplateBox | ||
|1 = 1 | |1 = 1 | ||
| | |1label-en= input text | ||
|1type = content | |||
|1stat = required | |1stat = required | ||
| Line 8: | Line 10: | ||
The template properly handles categories escaped with the [[w:en:Help:Colon trick|colon trick]], categories whose names include invalid characters such as "<code>></code>", and categories that are surrounded with [[w:en:WP:NOWIKI|nowiki]] tags. However, it does not support complex wikitext such as nested links or [[w:en:WP:MAGIC|magic words]] like <code><nowiki>__TOC__</nowiki></code>. Even so, it should still remove the vast majority of categories from any given wikitext. | The template properly handles categories escaped with the [[w:en:Help:Colon trick|colon trick]], categories whose names include invalid characters such as "<code>></code>", and categories that are surrounded with [[w:en:WP:NOWIKI|nowiki]] tags. However, it does not support complex wikitext such as nested links or [[w:en:WP:MAGIC|magic words]] like <code><nowiki>__TOC__</nowiki></code>. Even so, it should still remove the vast majority of categories from any given wikitext. | ||
| | |desc-td-en = This template strips categories from wikitext. For example, if passed the code "<nowiki>foo[[Category:Some category]]</nowiki>", it will return only "foo". It can be used to strip categories from templates as well; if passed the code "<nowiki>{{my template}}</nowiki>", it will return the template output minus the categories. | ||
|example = <nowiki>foo[[Category:Piped link|bar]]</nowiki> | |||
|example-value = {{suppress categories|foo[[Category:Piped link|bar]]}} | |||
|namespace = all | |namespace = all | ||
|usergroup = all | |usergroup = all | ||
|useTemplateData = only | |||
}} | }} | ||