src/Adapter/Page/PageIdentifiers.php
public function getCurrentTemplateName()
    {
        if (!($currentTemplate = basename((string) Registry::getRequest()->getRequestEscapedParameter('tpl')))) {
            // in case template was not defined in request
            $currentTemplate = Registry::getConfig()->getActiveView()->getTemplateName();
        }

        return $currentTemplate;
    }
public function getCurrentTemplateName()
    {
        if (!($currentTemplate = basename((string) Registry::getRequest()->getRequestEscapedParameter('tpl')))) {
            // in case template was not defined in request
            $currentTemplate = Registry::getConfig()->getActiveView()->getTemplateName();
        }

        return $currentTemplate;
    }
Returns current controller template name.

@return string