protected function setPage($scope = '', $template = '', $extension = '')
    {
        $template = empty($template) ? 'pages/index.tpl' : $template;
        $extension = empty($extension) ? \Context::getInstance()->getExtensionName() : $extension;

        $this->defaultData();
        $this->setData('scope', $scope);

        if ($this->isXmlHttpRequest()) {
            $this->setView($template, $extension);
        } else {
            $this->setData('content-template', [$template, $extension]);

            $layout = (array)$this->getLayout();
            $this->setView($layout[0], isset($layout[1]) ? $layout[1] : null);
        }
    }