Changes
Changing "Template" to "{{ns:Template}}". Thus slightly easier to port to other projects.
{{#switch:
  <!--If no or empty "demospace" parameter then detect namespace-->
  {{#if:{{{demospace|}}} 
  | {{lc: {{{demospace}}} }}    <!--Use lower case "demospace"-->
  | {{#ifeq:{{NAMESPACE}}|{{ns:Template}}
    | template
    | other
    }} 
  }}
| template = {{{1|}}}
}}<!--End switch--><noinclude>
{{pp-template|small=yes}}{{Documentationdocumentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>