Template:Namespace detect

Example usage: