5

NetBeans uses PHP Smarty Framework plugin for *.tpl files. Is it possible to change this to *.htm? I use .htm extension for smarty templates and would like to benefit from this PHP Smarty plugin. How can I do that?

Dawid Ohia
  • 14,918
  • 21
  • 73
  • 92

2 Answers2

13

In NetBeans (with the PHP Smarty Framework plugin installed):

  1. Click on the Tools menu, and select Options
  2. Click on Miscellaneous located toward the right side of the top icon bar of the Options dialog.
  3. Click on the Files tab.
  4. In the File Extension combo-box field, select htm.
  5. In the Associated File Type (MIME) field, change the value to TPL (text/tpl).
  6. Click OK

To restore the original behavior, repeat the above steps, except select HTML Files (text/html) in step 5.

RobertB
  • 4,422
  • 1
  • 27
  • 29
  • Note that this does not *change* the behavior from .tpl to .htm, but instead adds .htm to the list of extensions treated as template files. – RobertB Dec 05 '10 at 02:01
  • I didn't notice this answer before. Thanks a lot! – Dawid Ohia Sep 29 '11 at 11:54
  • Is it possible to do the same with *.inc.php extension? I cannot seem to be able to add that to the list of 'File Extensions' – Șerban Ghiță Aug 02 '13 at 08:21
  • 1
    @serbanghita I believe the answer to your question is no. AFAIK Netbeans only recognizes the last extension. On the other hand, adding the "php" extension would treat all .php files (including all .inc.php files) as Smarty Templates. That, of course, may not be what you want to have happen. – RobertB Aug 25 '13 at 18:55
1

I found http://wiki.netbeans.org/FaqCplusPlusDefaultExtensions , unfortunately it's only for C/C++ .

The php-tab should have something like it as well...

imme
  • 523
  • 1
  • 9
  • 20