CakePHP

CakePHP is a nice PHP framework. Its as delicious as it’s name.
Installation is too easy. Just follow the steps..

  • download cake php from here http://www.cakephp.org/
  • just unpack it to your host and point the url and do as the introductory page say

Now I want to discuss how i have intigrated Smarty in CakePHP

I know there are few drawbacks of smarty but its helpful for the people who are already master in smarty.

Intigrating Smarty with cakePHP will be like blessing for them. Because they dont need to learn the template engine of cakephp then :). Hope you guyz find this helpful

Steps

1. Download a version of SmartyView from here:
http://cakeforge.org/snippet/detail.php?type=snippet&id=6

  1. Save SmartyView as /(app)/views/smarty.php

2. Download Smarty

http://smarty.php.net/download.php
Extract tarball so Smarty.class.php sits at /vendor/smarty/Smarty.class.php

3. Create “smarty/compile” and “smarty/cache” within your tmp dir

(/(app)/tmp/ by default) and make them writable by the apache user

4. Include in your controller

(in app_controller.php to do it app-wide) var $view = 'Smarty'; and (to enable the SmartyHtml/SmartyJavascript helpers) var $helpers = array('SmartyHtml','SmartyJavascript'); to use Smarty templates and helpers.

You now have SmartyView installed!

Notes:

  1. /views/smarty_templates is parsed for smarty plugins : http://smarty.incutio.com/?page=SmartyPlugins
  2. SmartyView will fall back to .thtml templates for views.
  3. By default Smarty views must reside in ‘smarty’ subdirectories — see addendum for information regarding removing this requirement.
Advertisements
About

Work is fun!

Tagged with: , ,
Posted in PHP, PHP Frameworks
One comment on “CakePHP
  1. tahsin says:

    I came from x-cart site to ur site. but there is nothing about x-cart in ur blog.

    note: you can find helpful topics on zend exam preparation for php 5 certification on newdailyblog.blogspot.com

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Disclaimer
All content provided on this "tareqalam.com" blog is for informational purposes only. The owner of this blog makes no representations as to the accuracy or completeness of any information on this site or found by following any link on this site. The owner of [tareqalam.wordpress.com] will not be liable for any errors or omissions in this information nor for the availability of this information. The owner will not be liable for any losses, injuries, or damages from the display or use of this information.
April 2008
M T W T F S S
« Mar   May »
 123456
78910111213
14151617181920
21222324252627
282930  

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 23 other followers

%d bloggers like this: