How to see the code of ‘.ctp’ file as colorful as ‘.php’ file in NetBeans

NetBeans is one of the best and powerful IDE for any WebDevelopment specially best for PHP frameworks such as ZenCart, OpenCart, CakePhp etc.

CakePhp use their own custom file extension for its View files i.e. *.ctp. NetBeans doesn’t know about this file by default. So there are no color coding will be shown when these types of files are opened in the NetBeans. We have to manually enable these features.

Below are the steps to enable highlighting for CakePHP .ctpfiles.

1.  Go to Tools => Options

Go to Tools => Options

2.  Click on Miscellaneous => Files

Click on Miscellaneous => Files

3. Click on New button and type ctp. Then click on Ok.

Click on New button and type ctp. Then click on Ok.

4. From Associated File Type (MIMI): Choose:  text/x-php5.

From Associated File Type (MIMI): Choose: text/x-php5

5. Click on OK.

Note: Restart the IDE if changes don’t reflected after doing the above steps.

Sunny Saurabh

Sunny Saurabh

Sunny Saurabh is an experienced Software engineer in C# and ASP.NET as well as an expert as a PHP developer. He has also expert in database design, server maintenance and security. He has achieved this goal only in the short span of 3yrs and still looking forward to achieving more in the IT industry. He lives in New Delhi and his hobby to write the technical writeups.

Leave a Reply

Your email address will not be published. Required fields are marked *