Template:Namespace detect
From RouteWiki
{{#switch:
{{#if: | {{{demospace}}} | {{#if: | {{#ifeq:| | talk | }} | {{#ifeq:template|template talk | talk | template }} }} }}
| main | = | talk = | user = | wikipedia = | file | image = | mediawiki = | template = | help = | category = | portal = | book = | other | #default =
}}