I’ve been using Netbeans for web development with PHP for some time now and just keep on finding neat tricks. Most of the times I use TemplatePower for templating in my PHP applications. Your template files have to have the extension .tpl to work with TemplatePower. I had a problem with this because Netbeans didn’t recognize the files as html files (which they effectively are). There’s an easy way to fix this however, which works like this:
Go to Tools -> Options and click on ‘Miscellanous’. Now open the type called ‘File associations’. Click new, enter the extension for which you want to assign a file type and hit ‘Ok’. Now choose the associated File Type (MIME) that you want to go with this file extension. Done! You can do this for any file extension you want.
kara rawsib zegt:
doesn’t work on netbeats 6.5.
September 29th, 2008
Walter Vos zegt:
Hey Kara, it worked for me, what’s the problem?
October 15th, 2008
filz zegt:
yeah, doesn’t work on nb 6.5. The problem is that there’s no type called “file associations”. or where exactly is it supposed to be?
thanks in advance!
September 13th, 2009
Damian Dawber zegt:
Yes
Thank you for this!
December 16th, 2009
Chris zegt:
The tab is “Files” and “File associations” is the first listed section
December 21st, 2009
Walter Vos zegt:
Thanks Chris, that’s real helpful!
December 28th, 2009
javha zegt:
Thanks!!!
January 15th, 2010
Necropsique zegt:
Thank you, this really helped.
In 6.8 thou you can find the “File associations” in
Tools -> Options -> Files tab
April 8th, 2010
hakan zegt:
thank you
July 18th, 2010
student21 zegt:
Hello, thanks, very good!
I was looking fort that for a long moment!
Good morning from france!
August 1st, 2010
wisp zegt:
bedankt man, eeuwen lopen zoeken hiernaar maar altijd over het hoofd gezien
August 5th, 2010
Drew zegt:
Any means of removing file extensions? (like php)
August 17th, 2010
Walter Vos zegt:
It IS possible to change the MIME type association for (for instance) php files but it’s not possible to remove it from the list of supported file types. You could however use a regex pattern to make sure that php files are not visible in the projects folders. Go to Tools -> Options -> Miscellaneuous -> Files for these options.
August 22nd, 2010