You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using CakePHP3 with TwigView. However, I can not load any page on my application. I get the following error at the src/View/TwigView.php file. What am I doing wrong?
// file: src/View/AppView.php
namespace App\View;
use WyriHaximus\TwigView\View\TwigView;
class AppView extends TwigView
{
public function initialize()
{
}
}
Application class Setting
// file Application.php
class Application extends BaseApplication
{
/**
* {@inheritDoc}
*/
public function bootstrap()
{
$this->addPlugin('WyriHaximus/TwigView');
....
}
}
Layout file
// file: Template/Layout/default.tpl
Controller
class AppController extends Controller
{
public function initialize()
{
parent::initialize();
$this->viewBuilder()->setLayout("default");
}
}
The text was updated successfully, but these errors were encountered:
class AppView extends TwigView
{
/**
* Initialization hook method.
*
* Use this method to add common initialization code like loading helpers.
*
* e.g. `$this->loadHelper('Html');`
*
* @return void
*/
public function initialize()
{
parent::initialize();
$this->_ext = '.tpl';
}
}
I'm using
CakePHP3
withTwigView
. However, I can not load any page on my application. I get the following error at thesrc/View/TwigView.php
file. What am I doing wrong?I can not use
.twig
and.tpl
extensions too.The routing configuration:
TwigView Setting
Application class Setting
Layout file
Controller
The text was updated successfully, but these errors were encountered: