Install SmartyPDT Plugin into Zend Studio


Posted by Ben Johnson on 22 May 2011 | 0 Comments

Tags: ,,,,,

This guide explains how to install Smarty PDT with Zend Studio. Smarty PDT is a Smarty template syntax colouring, a feature that is not available by default with Zend Studio.

Installing Smarty PDT into Zend Studio

  1. Be sure to check that the .tpl fule are not associated with any content type. Go to Window -> Prefences -> General -> Content Types
  2. Download the latest SmartyPDT .zip (currently 0.9.0) from http://code.google.com/p/smartypdt/
  3. Go to Help -> Install New Software
    • Click Add then click Archive button and select the .zip downloaded previously
      Zend Studio - Install Plugin SmartyPDT
    • By default the Group item by category ensure you unselect this
      Zend Studio - Install Plugin SmartyPDT
  4. Click Next, accept the condition and restart Zend Studio
  5. If you are prompted that this is an unsigned package, just ignore the warning and install it anyway.
  6. Right click on the PHP project in the PHP Explorer and Select Configure -> Add Smarty Support

Update/Fixes if this does not work by default

  1. Check you have the Smarty Editor selected as default for *tpl file in File Association in Preferences -> Ceneral -> Editors -> File Associations
  1. If after restarting Zend Studio you may find that the .tpl file type is locked. The only option I found was to remove the .tpl directly from the plugin PDT. 
  2. Firstly close Zend Studio to edit the core files:
    1. Go to the plugins folder where Zend Studio is installed (Mine was C:\\Program Files\Zend\Zend Studio - 8.0.0\plugins
    2. File the file org.eclipse.php.core_2.2.1.vxxxxxxxx-xxxx.jar - the exact version of the plugin may change with updates to the PDT
    3. You can infact open this file as a normal archieve file just like a .zip file. Right click a select open with is this does not open by default, if this does not work try renaming the file extension.
    4. Extract all the file and edit the the plugin.xml file
      • Search for "tpl", this was line number 53 and remove "tpl" from the list