Post by bg17aw » 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...

Newbie

Posts

Joined
Thu Jan 19, 2017 2:44 am

Post by IP_CAM » Mon Apr 24, 2017 5:41 am

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

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by viethemes » 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 :)

http://www.viethemes.com - OpenCart turtorials, news, tips and stricks, extension

Our extensions:
Visual Theme Editor - Powerful tool for customizing style of any theme visually
Live Theme Editor - Customize layout, colors, backgrounds, fonts of the default theme
Theme Animation - Animation Editor for any theme

Extra Positions PRO, Custom JavaScript, Custom CSS and others


User avatar
Active Member

Posts

Joined
Thu Jan 08, 2015 12:17 pm


Post by bg17aw » Tue Apr 25, 2017 3:07 pm

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?

Newbie

Posts

Joined
Thu Jan 19, 2017 2:44 am

Post by bg17aw » Tue Apr 25, 2017 4:04 pm

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.

Newbie

Posts

Joined
Thu Jan 19, 2017 2:44 am

Post by uksitebuilder » Tue Apr 25, 2017 5:16 pm

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

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by Chris_UK » Sat Oct 28, 2017 8:31 pm

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.

New member

Posts

Joined
Wed Jan 20, 2016 4:39 am
Who is online

Users browsing this forum: No registered users and 169 guests