Add a custom file extension to Netbeans

garrow picture garrow · May 25, 2009 · Viewed 26.2k times · Source

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.

Answer

karim79 picture karim79 · May 25, 2009

Let me guess, for Smarty templates? I did the following

  1. Open Tools and Select Options.
  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!
  7. (Restart of Netbeans may be required to see the actual changes)