Table of contents
How to create a project with Smarty?
Smarty is a template engine for PHP, facilitating the separation of presentation (HTML/CSS) from application logic. This implies that PHP code is application logic, and is separated from the presentation. If you are using the Native installer, to start a project with Smarty, it is necessary to start the BitNami Console. If you are using a Virtual Appliance or AMI, you can run the commands below directly.
These are the files that you can find in the frameworks/smarty folder:
demo libs sample README COPYING.lib change_log.txt
You can check the "sample" or "demo" folders to know the folder structure of a smarty application. In this case, if you want to enable the "sample" application, you should uncomment the following line at the end of the installdir/apache2/conf/httpd.conf file:
Include "installdir/frameworks/smarty/conf/smarty.conf"
Then restart the Apache server and point your browser at http://your_domain/smarty. You can use the graphical Manager Tool or using the following command line:
./ctlscript.sh restart apache
You can see the the following message:
Hello, BitNami! Smarty Installation test... Testing template directory... /home/bitrock/lampstack-5.3.16-1/frameworks/smarty/sample/templates is OK. Testing compile directory... /home/bitrock/lampstack-5.3.16-1/frameworks/smarty/sample/templates_c is OK. Testing plugins directory... /home/bitrock/lampstack-5.3.16-1/frameworks/smarty/libs/plugins is OK. Testing cache directory... /home/bitrock/lampstack-5.3.16-1/frameworks/smarty/sample/cache is OK. Testing configs directory... /home/bitrock/lampstack-5.3.16-1/frameworks/smarty/sample/configs is OK. Testing sysplugin files... ... OK Testing plugin files... ... OK Tests complete.
You can find more info about Smarty at http://www.smarty.net/quick_install

Comments