To open and read the .phtml (Zend Framework) .thtml or .ctp (CakePHP) files in Dreamweaver just like the .php files follow these steps – 1. Open the file – C:\Program Files\Macromedia\{Dreamweaver Folder}\Configuration\DocumentTypes\MMDocumentTypes.xml (Replace C: with the drive name where your OS is installed) 2. Search “php,php3,php4,php5” (It will be line # 75). After php5 add… Continue reading Opning phtml thtml ctp Files In Dreamweaver
Tag: CakePHP
Displaying Customized Error Message CakePHP 1.2
When we provide the error message in a particular model, then after validating, CakePHP automatically displays that error message below the respective input control, by creating their own div and error message class. But we can also show the error message in our own style using error function of form helper ($form->error()). Suppose there is… Continue reading Displaying Customized Error Message CakePHP 1.2
How to import a controller in CakePHP
Suppose we have a controller named pages_controller.php, in which there is a function named index(). Now we are working in an another controller named users_controller.php, and we want to use the index function defined in Pages Controller. App::import(‘Controller’, ‘Pages’); class UsersController extends AppController { var $Pages; function beforeFilter() { $this->Pages =& new PagesController; /*Loads the… Continue reading How to import a controller in CakePHP
Creating a simple form and custom validation rules in CakePHP 1.2
Note: In CakePHP 1.2, form related methods have been deprecated from the HtmlHelper and moved to the new FormHelper. Now we have to use FormHelper instead of HtmlHelper. Also the tagErrorMsg is removed in the current version. Our Controller Class:For validating the given input, we need to write this in our controller function: class PagesController… Continue reading Creating a simple form and custom validation rules in CakePHP 1.2