SmartyDWT

What is SmartyDWT?

SmartyDWT is an extension for Macromedia Dreamweaver MX and MX 2004 that allows you to easily edit templates that are based on Smarty.

What is Smarty?

Smarty is a very popular open source template engine based on PHP. It is fast, stable, extendable, easy to use and comes with a lots of useful features.

Visit the Smarty website and the PHP website for further details.

What is included in the SmartyDWT package?

Version 1.3.2 includes the extension for Macromedia Dreamweaver and a PHP class.

The extension adds a new ‘insert’ toolbar, extends the ‘insert’ menu, code formating rules and color scheme icons for smarty tags that are visible in dreamweavers design view. The extension also adds the new file extension. The document type ‘tpl’ is added by the SmartyDWT Document Type Addon. The addon is only needed for older versions of Macromedia Dreamweaver. In newer versions ‘tpl’ is a default document type.

The included PHP class extends the Smarty class so it will convert all smarty tags used within dreamweaver to the standard tag format used within Smarty.

How to install SmartyDWT?

Unzip the downloaded file and double click the file smartyDWT.mxp. This will start the Macromedia Extension Manager and install the extension.

You can download the Extension Manager directly from Macromedia. It is free.

How to update SmartyDWT?

Unzip the downloaded file and double click the file smartyDWT.mxp. This will start the Macromedia Extension Manager and first uninstall the older version before it installs the newer one.

I get the following warning message when starting Dreamweaver:

The Document Type “Smarty Template” will not be added because it uses a file extension
that is already associated with a prior Document Type.”

What now?

The document type “tpl” was already registered when you installed SmartyDWT. Maybe you added this yourself or some other extensions did it or you have got a newer version of Dreamweaver MX 2004 in which “tpl” is registered by default.

There are 2 ways to remove the the warning:

[a] Update to the newest version (1.3.2) of SmartyDWT.
Do NOT install the SmartyDWT Document Type addon.

[b] Fix it manually by removing the double entry for “tpl” in the file MMDocumentTypes.xml. For further details on editing this file:

http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_16410

TECHNICS

For more information about extending Macromedia Dreamweaver:

http://www.macromedia.com/support/dreamweaver/extend.html

http://download.macromedia.com/pub/exchange/mxi_file_format.pdf

HISTORY

v 1.0

+ New Smarty menu for Macromedia Dreamweaver MX and MX 2004 (InsertMenu extension)

v 1.1

+ New color icons
+ PHP class added

v 1.2

+ New source code formatting rules (TagLibrary extension)

v 1.3.0

+ New ‘insert’ menu added (menu extension)
+ Introduction of new document type and extension ‘.tpl’
+ Fixed some mxi file bugs

v 1.3.1 (31.05.2005)

+ Moved the document type registering to an extra extension “smartyDWT-dt-addon.mxp” which can be installed optionally. This fixes the document type warning in newer versions of Macromedia Dreamweaver where “tpl” is registered as a document type by default.
+ Fixed New Document Type Bug in New Document dialog (smartyDWT-dt-addon.mxp)

v 1.3.2 (01.06.2005)

+ Fixed Insert Bar Icon Bug in Dreamwaver MX – changed icons from png to gif

Future Releases

+ Add source coloring
+ Think about xml-style tags
+ Add edit inspector

SCREENSHOTS

The Smarty ‘insert’ toolbar in Macromedia Dreamweaver.

Icons for smarty tags in the design view
(click for a bigger screenshot)

Source code formatting
(click for a bigger screenshot)

LICENCE

CC-GNU LGPL
SmartyDWT is published under the CC-GNU LGPL

DOWNLOAD

SmartyDWT 1.3.2 (smartyDWT.zip) >> 64 KB

The zip file contains the Macromedia Dreamweaver extension (mxp file & source) and a PHP class.

It is provided as is. No warrenties. No support.
Use it. Improve it. Let me know.

THANK YOU – LINKS

Other Smarty Dreamweaver extensions

http://www.contactlensesprice.com/smarty
http://tikiwiki.org/tiki-list_file_gallery.php?galleryId=8
http://sourceforge.net/projects/openpublisher

Some more hints about extending Dreamweaver

http://smarty.incutio.com/?page=SmartyDreamweaver
http://smarty.incutio.com/?page=ConfiguringDreamweaver

Leave a comment