[fuelapp/fuel/app/vendor/] +- [Smarty] +- [libs] +- [plugins] +- [sysplugins] +- debug.tpl +- Smarty.class.php +- SmartyBC.class.php
$ cd fuelapp/fuel/app/vendor/ $ svn checkout http://smarty-php.googlecode.com/svn/trunk/distribution Smarty
$ rm -rf Smarty/demo/
$ cd fuelapp/fuel/packages/ $ git clone https://github.com/ttoz/fuel-smarty
'packages' => array( 'parser', // Smartyを有効化 'fuel-smarty', // Fuel-Smartyを有効化 ),
$ cp fuelapp/fuel/packages/parser/config/parser.php fuelapp/fuel/app/config/parser.php
<?php return array( 'smartytest' => 'smartytest/index', );
<?php class Controller_SmartyTest extends Controller { function action_index() { return Response::forge(View_SmartyTest::forge('smartytest')); } }
<?php class View_SmartyTest extends ViewModel { function view() { $this->title = 'Smarty Test'; } }
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>{$title}</title> </head> <body> <p>{$title}</p> </body> </html>