Template:Namespace detect/doc: Difference between revisions

Created page with " ==Description== This metatemplate is used to help other templates detect which namespace they are in. It detects and groups the different namespaces on K6..."
sims>K6ka
No edit summary
(Created page with " ==Description== This metatemplate is used to help other templates detect which namespace they are in. It detects and groups the different namespaces on K6...")
Line 3:
This metatemplate is used to help other templates detect which [[Help:Namespace|namespace]] they are in.
 
It detects and groups the different namespaces on The SimsK6ka's Wiki into four types:
 
* '''main''': The main or article namespace, where the wiki's content articles are kept.
* '''talk''': Any talk page, including page names that start with "Talk:", "User talk:", "File talk:", etc.
* '''user · the simsk6ka's wiki · file · mediawiki · template · help · category''' (etc.): The remaining namespaces that serve various different purposes.
* '''other''': Any namespace that isn't specified as a parameter in this template.
 
'''NB''': It is probably easier to use templates like {{t|Checkmns}} and {{t|Checkfns}} that only check to see if they're in one specific namespace. This template is meant to be a "catch-all" template that supports all namespaces.
 
==Usage==
Line 49 ⟶ 47:
</pre>
 
If the template is used on any pagespage otheroutside thanof the File or Category pages, it will not display anything.
 
You can use this trick to make the template not render anything for a specific page type, like this:
Line 140 ⟶ 138:
 
==Credits==
This template's code was copied from an old version of Wikipedia's [[wikipedia:Template:Namespace detect|Namespace detect]] template, found [httphttps://k6kaen.shoutwikiwikipedia.comorg/wikiw/index.php?title=Template:Namespace_detect&oldid=388733912 K6ka's Wiki on ShoutWikihere]. This template documentation was taken partially from [http[wikipedia://k6ka.shoutwiki.com/wiki/Template:Namespace_detectNamespace detect/doc|Template:Namespace theredetect/doc]] on the asEnglish wellWikipedia.
 
<includeonly>[[Category:Auxiliary templates|{{PAGENAME}}]]</includeonly>
<noinclude>[[Category:Template documentation|{{PAGENAME}}]]</noinclude>