Develop your apps using Smarty 3 and PhpStorm

PhpStorm brings Smarty 3 PHP Template Engine power to its users.
First of all it supports Smarty syntax, highlights keywords, automatically closes tags and enables autocompletion of Smarty tags in template files:

Smarty syntax highlighting in PhpStorm IDE

The IDE handles language mixtures like HTML, JavaScript and PHP code inside Smarty templates. It not only highlights HTML inside Smarty, but even provides autocompletion:

Smarty autocompletion in PhpStorm IDE

as well as useful quick-fixes. As shown on the screenshot below, the IDE offers you to adjust the image size to its original height.

Quick-fixes

Another very useful feature is the Structure view where you can overview and navigate through your template structure.

Of course, you can set custom delimiters to avoid conflicts between standard Smarty delimiters “{ }” and javascripts brackets. For example, you may set delimiters for smarty like this: “<!–{”  :

Smarty custom delimiters

In addition to Smarty support, you also get many nice IDE features such as code folding/unfolding, PhpUnit support for your projects, refactorings, a Visual Debugger based on Xdebug or Zend Debugger, and best-in-class JavaScript editing support.

» Download stable PhpStorm 1.0 with basic Smarty support
» Download PhpStorm 2.0 Early Access Preview with full Smarty 3 support

This blog is permanently closed.

For up-to-date information please follow to corresponding WebStorm blog or PhpStorm blog.

 
This entry was posted in Cool Feature, PhpStorm and tagged , , . Bookmark the permalink.

14 Responses to Develop your apps using Smarty 3 and PhpStorm

  1. Tank says:

    Come on, follow your roadmap and update it frequently.
    http://confluence.jetbrains.net/pages/viewpage.action?pageId=15801728

    I really need SASS 3 support, especially compilation support. And if you do HAML support, PHP-Storm will be the holy grail for pro front-end developers.

  2. Jason Gu says:

    Hi

    When will the next EAP be released?

    Thanks
    Jason

  3. Rafi says:

    Me and a lot of people stay away from Smarty. Have you thought about adding the Mustache format?

  4. yehosef says:

    Second on the mustache support – the fact that I can write one template that can be used for php and Javascript (and ruby and java and…) is pretty attractive.

  5. @Amal Samally
    Yes, we know. We are going to fix most of them in our 2.0 release which is planned at the end of January.

  6. Vladimie says:

    End of January? Then please correct this “(Q4 2010)” in your development roadmap for PHPStorm. Thx.

  7. Cesa says:

    It’s great to have support for Smarty.

  8. @Vladimie
    Thank you, Vladimie. Corrected.

  9. Sam says:

    Hi PhpStorm,

    How does one debug and set breakpoints in phpstorm when trying to debug smarty? i want to be able to debug it like how i am able to debug php, javascript, etc., being able to inspect the values of the variables, etc.

    thank you.

  10. Sinisa says:

    I’m using lots of javascript inside my smarty template (I know I should do that). Can PhpStorm somehow detect this javascript (for autocompletition). The same problem is with CSS included in template file. It is, probably, not detected correctly and therefore the color boxes (really great help) are not displayed. Both Javascript and CSS is working correctly when inside CSS and JS separate file.

  11. rustam.vishnyakov says:

    Normally JavaScript is detected inside “script” tag. If there is another way to add JavaScript code, PhpStorm may not detect it. So it depends on template.

Comments are closed.