Associating .thtml files with PHP in Eclipse (for CakePHP)
If you are working with CakePHP, you will know that the view template files have the file extension .thtml. If you want syntax highlighting and PHP parsing for these files in Eclipse, you will need to take the following steps:
- Open up the Eclipse preferences from the ‘Window’ menu > ‘Preferences’.
- Navigate to General > Editors > File Associations.
- Select .thtml if it is already there, add it if it isn’t.
- Add ‘PHP Editor’ in the Associated Editors box and make it the default.
- Navigate to General > Content types.
- Select ‘PHP Source File’ and add .thtml to the file associations.
.thtml files should now be PHP parsed and highlighted. Thanks to cakebaker for this tip!
Tags:





Thanks, very useful tip.