Editing *.ctp file in Eclipse.

Eclipse is a famous editor for the development with php. But to code with cakephp we need to configure this eclipse editor. Because by default eclipse does not hightlight the html or php syntex of cakephp view file.Here are the steps to set up eclipse for highlighting the codes in a .ctp file.

  • Firstly open the  Eclipse workspace.
  • Now go to Preferences from Window menu.
  • From Preference click on the General tab from the list.
  • Now click on Content-Types under General  tab.
  • On the right panel in the Content-Types, expand the Text tab.
  • Select PHP Content-Types .
  • There are all the lists of  files associated with php in below e.g. *.php,*.php3,*.php4
  • Now click on the Add button and type the fie extension e.g. *.ctp in the content type input field.

Now you need to reopen the file  you are working on.

Happy coding 🙂

7 thoughts on “Editing *.ctp file in Eclipse.

Leave a comment