Use $this->params insteand  $app->getTemplate(true)->params at the templates

As requested (https://github.com/joomla/joomla-cms/pull/3782#discussion-diff-13786134) see here @bakual