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);
        }
    }
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);
        }
    }
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 ) ; } }
Assigns the template to render.
@param string [$scope] - A CSS class name that scope the view
@param String [$template] - Defines the path of the view, default to 'pages/index.tpl'
@param String [$extension] - Defines the extension that should contain the template
Assigns the template to render .