Page 1 of 1

Netbeans thinks .tpl files are Smarty files

Posted: Mon Apr 24, 2017 5:01 am
by bg17aw
Hi, how do I get Netbeans to see .tpl files in Opencart as php files to have the correct syntax highlight?

Such a poor choice of extension for opencart...

Re: Netbeans thinks .tpl files are Smarty files

Posted: Mon Apr 24, 2017 5:41 am
by IP_CAM
Well, xxx.tpl files are no PHP Files, so, what should be a good reason, to 'handle' them a such ?
But I am not familiar with Netbeans, so I may be off track... :D
Ernie

Re: Netbeans thinks .tpl files are Smarty files

Posted: Mon Apr 24, 2017 9:55 am
by viethemes
bg17aw wrote:
Mon Apr 24, 2017 5:01 am
Hi, how do I get Netbeans to see .tpl files in Opencart as php files to have the correct syntax highlight?

Such a poor choice of extension for opencart...
You can choose PhpStorm to avoid this problem :)

Re: Netbeans thinks .tpl files are Smarty files

Posted: Tue Apr 25, 2017 3:07 pm
by bg17aw
IP_CAM wrote:
Mon Apr 24, 2017 5:41 am
Well, xxx.tpl files are no PHP Files,
So what would you call them, how would you describe them, if not PHP files?

Re: Netbeans thinks .tpl files are Smarty files

Posted: Tue Apr 25, 2017 4:04 pm
by bg17aw
viethemes wrote:
Mon Apr 24, 2017 9:55 am
bg17aw wrote:
Mon Apr 24, 2017 5:01 am
Hi, how do I get Netbeans to see .tpl files in Opencart as php files to have the correct syntax highlight?

Such a poor choice of extension for opencart...
You can choose PhpStorm to avoid this problem :)
phpstorm will probably have the same issue, since it also supports Smarty: https://www.jetbrains.com/help/phpstorm ... marty.html

i could of course de-associate .tpl extension from Smarty, in both Netbeans and phpstorm, but I also work with Smarty, so need it.

Re: Netbeans thinks .tpl files are Smarty files

Posted: Tue Apr 25, 2017 5:16 pm
by uksitebuilder
tpl's are template files that contain a mix of html/js/css and php

Not specifically for Smarty but most likely more widely used in Smarty or Smarty is / was the most popular engine to use tpl's

OC 3.0 will use .twig instead of .tpl but will most likely be associated with Symphony

Re: Netbeans thinks .tpl files are Smarty files

Posted: Sat Oct 28, 2017 8:31 pm
by Chris_UK
You may have already solved this but I was looking for opencart netbeans autocomplete and this was one of the very first results.

tpl files in netbeans are not smarty as we all know, you can turn off smarty association in the project properties so they are correctly checked by the ide.

There is no way to resolve the html issues in netbeans (not upto 8.2 anyway) for tpl files because they are all small sections of the larger picture you will either have to exclude html checking, class checking and the like on the files or request that netbeans update the smarty plugin to reflect the fact that it isnt smarty but "template" files which can be fragmented.

Another option is for somebody to build a plugin that will work properly with pre opencart v3 but as i suspect once people will gradually be upgrading I dont see it being a priority.