PhpSmartyFrameworkPlugin

PHP Smarty Framework plugin

Author: Martin Fousek, martin.fousek(((at)))gmail.com

Contents


What is Smarty?

Smarty is a template engine for PHP, facilitating the separation of presentation (HTML/CSS) from application logic. This implies that PHP code is application logic, and is separated from the presentation. www.smarty.net

This page describes how to work with Smarty in NetBeans IDE

Download instructions

  • download Smarty plugin from development update center (for Dev builds of NB IDE) or from plugin portal (for the last release of NetBeans IDE) or
  • install PHP Smarty Framework plugin directly in your IDE in Tools->Plugins->Available

First steps - Tips

  • once you have installed PHP Smarty Framework plugin you can start to use it (without IDE restart)
  • as a Smarty project will be recognized any project which contains .TPL files (it mustn't be .tpl if you will set it in Options differently - i.e. you can use it for Nette framework for .latte or .phtml file extensions)
  • by default the Smarty searches for the .tpl (or similar) files in first level of subdirectories - you can change it in Options->PHP->Smarty
  • as a delimiters are by default used { and } braces, you can change them in the global options (Options->PHP->Smarty) or in the Project Properties of projects which are recognized as a Smarty project

Features of the plugin

  • Syntax highlighting including coloring background of tags (if required)
  • Custom Smarty delimiters
  • Recognizing .TPL and Smarty projects (marking them with appropriate icon or badge icon)
  • Common HTML features outside the Smarty code and PHP features inside {php}{/php} tags
  • Basic code completion for Smarty functions and its atributes
  • New File wizard offers also creation of Smarty Template
  • Support for Smarty2 or Smarty3 syntax
  • Code completion also for Smarty3
  • Braces Matching - highlighting related starting/else/ending tags
  • Language sensitive toggle comment action

Help to improve this plugin


Mar/24/2011 Martin.Fousek@ORACLE.com

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo