views:

939

answers:

3

I am trying to figure out how to add a custom file type to be recognised by Netbeans.

I am editing .tpl files and I would like them to be recognised as PHP/HTML files.

I've looked here and here but I cant find cnd.properties in config directory and there is no Advanced Options dialog in the options dialog.

I'm using Netbeans 6.5 with PHP and all modules up to date.

+2  A: 

Let me guess, for Smarty templates? I did the following (I'm using Netbeans on Mac, steps may be slightly different):

  1. Open preferences.
  2. Select Miscellaneous tab.
  3. Select Files sub-tab thing.
  4. Click on New file extension and enter tpl.
  5. Select the mime type.
  6. Click ok. Done!
karim79
Thanks so much... zomg, I can't believe I missed this. On Windows Step 1 is Tools -> Options
garrow
It took me a year to figure out. It's really not as intuitive as it should be :)
karim79
A: 

Thanks a lot for this post, i was searching for the same

A: 

Not strictly an answer but is anyone else experiencing problems typing in quotes or double quotes (' or ") after marking .tpl files as PHP (text/php-5)?

Gulli