Open CakePHP files in Dreamweaver with proper format(with coloring in PHP)

Hello Friends !!

Today I write about the framework. Currently I am starting CakePHP which is the MVC opensource which is widely used to develop rapid and user friendly application.

Its uses MVC structure. MVC => Model,View and Controller

Now I give you the basic idea about this framework.

Hello Friends !!

Today I write about the framework. Currently I am starting CakePHP which is the MVC opensource which is widely used to develop rapid and user friendly application.

Its uses MVC structure. MVC => Model,View and Controller

Now I give you the basic idea about this framework.

Hello Friends !!

Today I write about the framework. Currently I am starting CakePHP which is the MVC opensource which is widely used to develop rapid and user friendly application.

Its uses MVC structure. MVC => Model,View and Controller

Now I give you the basic idea about this framework.

  1. The Model represents the application data
  2. The View renders a presentation of model data
  3. The Controller handles and routes requests made by the client

In cakePHP, the extension of template file is .ctp which is normally not opened in dreamweaver properly. So if you want to open your template files in dreamweaver properly then you have to change extentions in some files. Please follow blow steps to change the extensions :

1. go to C:\Program Files\Adobe\Adobe Dreamweaver CS3\configuration ,open Extensions.txt and at first line at the end please add ,MASTER,THTML,CTP:All Documents

2. in same file add two extentions so it looks like this PHP,PHP3,PHP4,PHP5,TPL,THTML,CTP:PHP Files

Next open the “DocumentTypes” folder and edit the “MMDocumentTypes.xml” file, just open it up using notepad or wordpad. Search for the line which has an id “PHP_MySQL” and add the THTML/CTP file extensions to both the “winfileextension” and “macfileextension” so the line should read:

  1. winfileextension=”php,php3,php4,php5,thtml,ctp”
  2. macfileextension=”php,php3,php4,php5,thtml,ctp”

After changes, please restart your dreamweaver and after this check the template file in deamweaver. Thats it !

If you like this post then fell free to comment o this.

Thanks !!

  • benmanns

    Thanks! I've been looking for this.

    In CS4/CS5 you have to go to Edit->Preferences->File Types / Editors and add .ctp to the list for “Open in code view:”.

  • http://buildingwebsitesmadesimple.com/dreamweaver-tutorial.html Dreamweaver tutorial

    I have been sourcing out for this code so I would like to thank you for sharing this post to us.

  • K Abdessamad1

    thx man 🙂

  • http://www.web2websolutions.com/ Harry Ghuman

    thanks that’s exactly what I needed.

  • Murtazabaig20

    thank,s man

  • nynex66

    Windows XP platform uses the following location:

    hard disk:Documents and SettingsusernameApplication
    DataAdobeDreamweaver CS5Configuration

    Note: It is possible that this folder is inside a
    hidden folder.

    Windows Vista platform uses the following location:

    hard disk:UsersusernameAppDataRoamingAdobeDreamweaver CS5Configuration

    Mac OS X platform uses the following location:

    hard disk:Users/username/Library/Application Support/Adobe/Dreamweaver CS5/Configuration