LoginSignup
0

More than 5 years have passed since last update.

Cómo utilizar Smarty con CakePHP 3.0

Posted at

Este es un tutorial para instalar Smarty para CakePHP 3.0.

en English
en 日本語

Steps

1. Descargue el SmartyView

desde aquí: https://github.com/yukikikuchi/cakephp3-smartyview
Descargar guardar SmartyView como app/src/View/SmartyView.php

2. Descargue el Smarty

http://smarty.php.net/download.php
Extraer a app/vendor/smarty

3 . Incluya en su controller

AppController.php

class AppController extends Controller {
    public $viewClass = 'App\View\SmartyView';
}

4 . Crear el archivo layout

Crear un fichero app/src/Template/Layout/default.tpl

default.tpl

{$this->fetch('content')}

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0