Smarty plugin for NetBeans [closed]
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
开发者_开发知识库 Improve this questionI am looking plugin for work with Smarty in NetBeans.
I need coloring of my code and normal syntax analysys.
I could find only this plugin: Smarty Editor, but I could not make it work.
Can you tell me about another plugin for Smarty or teach me how to install SmartyEditor?
Edit: I use Windows XP SP3
Hi you can intall the PHP Smarty Framework Plugin just by using the Netbeans plugin manager:
Tools -> Plugins -> Available Plugins -> Serach for "Smarty" -> Insall
This runs directly without restarting your IDE.
(I'm using NB 6.9.1)
It worked for me, out of the box. I use NetBeans 6.7.1 and this is what I did
- Downloaded the plugin .nbm file from the location you mentioned
- Install plugin as explained here
- In an existing project with web stuff, File-->New File-->Other-->Empty Smarty file
This generated at .tpl file with just
{*
Author:
Smarty template
*}
in it. As explained on the plugin download page, outside the Smarty tags you get only basic functionality in as well php as html segments of the file, but as far as I can see the syntax coloring of php and html is OK. Code completion works fine inside Smarty tags.
Regarding syntax analysis: I created a number of errors is html and php in the tpl file and it seems to pick them up correctly.
So, while it's annoying that you loose code completion in html and php it looks quite usable and useful to me.
Let me know if these instructions solved your problem.
Just found this post from Google and saw that the information is now outdated.
In the most recent builds of NetBeans, there is now official support for Smarty: http://blogs.oracle.com/netbeansphp/entry/initial_support_for_smarty_available
Just download the development versions of NetBeans. Then go to tools > plugins and search for the "PHP Smarty Framework" plugin and install it.
Hello What you have todo is to first install the smarty editor plugin then edit this file on vista : C:\Users\yourusername.netbeans\6.7\config\Services\MIMEResolver\user-defined-mime-resolver.xml
Delete everything and add the following code to the file :
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE MIME-resolver PUBLIC "-//NetBeans//DTD MIME Resolver 1.1//EN" "http://www.netbeans.org/dtds/mime-resolver-1_1.dtd">
<MIME-resolver>
<file>
<ext name="tpl"/>
<resolver mime="text/x-tpl"/>
</file>
</MIME-resolver>
In Netbeans 6.9.1 plugin available but works only syntax highlight and html-tag completion. Smarty tags doesn't work.
Basic code completion for Smarty templates will be available in NetBeans 7.0. I'm afraid that the rest code completion will have to wait till will be implemented some indented for automatic code formating which seems to be more required feature by users.
No longer listed in available plugins nor available natively (I'm using 7.0.1), looks like this is the plugin to use, executing the file installed it fine for me: http://plugins.netbeans.org/plugin/37379/php-smarty
精彩评论