Download Smarty from here
Extract it to app/vendor/smarty
composer require smarty/smartyCopy the SmartyView.php file from src > View folder to your View folder.
Load SmartyView in your CakePhp project like in AppConroller.php file or below:
namespace App\Controller;
use Cake\Controller\Controller;
use Cake\Event\Event;
class AppController extends Controller
{
// Your code
public function beforeRender(Event $event)
{
$this->viewBuilder()->className('Smarty'); // SET SMARTY VIEW
}
// Your code
}Rename all template files with .ctp extension in .tpl extension.
IMPORTANT: You can rename all, not just the templates and include all with Smarty include {include file="_file_.tpl"} syntax.
{$this->fetch('content')}
Enjoy ;)