Template:FULLBASEPAGENAME/doc

This template returns the namespace and the base page name of the page that transcludes it.

It is basically equivalent to  in namespaces with subpages enabled. Otherwise it returns the full page name with.