Thursday, January 20, 2011

Netbeans detect cakephp .ctp file

It is happen I use Netbeans as IDE and CakePHP as web framework
The problem is Netbeans only detect .php, .html and others but not .ctp file

.ctp file is a cakephp file which is similar to .php (dont know why these cakephp guys want to use different file name)


Fow Windows users

And to make the Netbeans to be able to detect it was originally from this blog http://www.davidtan.org/netbeans-enable-syntax-hightlighting-for-cakephp-ctp-view-files/comment-page-1/#comment-18469

I rewrite down the same thing
  1. From the Menu, go to Tools > Option (Then there will be a pop-up window named "Options")
  2. From the Options windows there is several Tabs, click on the "Files" tab
  3. Under the Files tab, there is a "File Extension:". Try to create a new file extension and name it "ctp"
  4. Then "Associated File Type (MIME)" for the ctp file extension, set it to "text/x-php5"
  5. Finally press "OK" button at the bottom


For Ubuntu users

I found the solution from here, pretty much the same but slightly in different place
http://forums.netbeans.org/post-60683.html&highlight=

Write back same things
tools > option > miscellaneous > Files tab

2 comments:

Anonymous said...

In 2014 this still works!

clod said...

I prefer to use Codelobster IDE for CakePHP projects