RE: [SMARTY] User smarty template with Dreamweaver MX

From: Date: Wed, 24 Jul 2002 05:56:50 +0000
Subject: RE: [SMARTY] User smarty template with Dreamweaver MX
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-5404@lists.php.net to get a copy of this message
That's exactly what I am looking for. It works like a charm. Thank you very much. -----Original Message----- From: Gary Loescher [mailto:gary@loescher.org] Sent: Tuesday, July 23, 2002 12:07 PM To: smarty-general@lists.php.net Subject: RE: [SMARTY] User smarty template with Dreamweaver MX Here is some documentation about getting DW to recognize other file types, such as .tpl: http://www.macromedia.com/support/dreamweaver/ts/documents/add_ext_mx.ht m It's not too bad. I got it to work in a few minutes, even though I just started playing with DW myself (I'm used to non-WYSIWYG editors). If you want to get color syntax highlighting it's a bit more involved: you need to edit the CodeColoring.xml and possibly Colors.xml in your Configuration directory (see caveat below): 1. In CodeColoring.xml, find the HTML scheme (near the top): <scheme name="HTML" id="HTML" doctypes="ASP.NET_VB,ASP.NET_CSharp,A ... If you've set DW to recognize TPL as an extension, you should add it here to the doctypes attribute. 2. Add a Smarty scheme to CodeColoring.xml. I've attached one I used as a first cut; I'm sure other people will be able to improve it :) All I did was tell DW to use the PHP colors on the Smarty keywords. It doesn't work 100% (with text strings and operators, for instance) but at least the keywords are highlighted. To add it, just paste the attached file somewhere between the <codeColoring> </codeColoring> tags, after one of the existing <scheme> </scheme> elements. If you want to set up your own Smarty colors, I believe it's possible to edit them within DW from a preferences menu somewhere. Or, you can dive into Colors.xml. A caveat: DW installs "personal" copies of some of the config files in \Documents and Settings\<user>\Application Data\Macromedia\Dreamweaver MX\Configuration\... These settings will _override_ the ones found in DW's Configuration directory, so change these files instead. If anyone comes up with a better way of doing this, or a more complete colorizing file, please post! HTH, Gary > -----Original Message----- > From: Jonathan Chum [mailto:jchum@aismedia.com] > Sent: Tuesday, July 23, 2002 7:52 AM > To: 'J'; smarty-general@lists.php.net > Subject: RE: [SMARTY] User smarty template with Dreamweaver MX > > > What I tend to do is just use the .html extension rather than > .tpl because > Dreamweaver associates .html upon installation of the application. > > I also tend to set the delimiters to <!--{ }--> and use the > Smarty conf to > utilize these delimiters as it appears so much better in > design view rather > than the curly braces. > > I've also attached a zip that was distributed by Mattia > [mattia.c@libero.it] > a few weeks ago which works great! > > -----Original Message----- > From: J [mailto:zjs2k@mindspring.com] > Sent: Tuesday, July 23, 2002 12:01 AM > To: smarty-general@lists.php.net > Subject: [SMARTY] User smarty template with Dreamweaver MX > > > Hello, everyone. I am new here and I have a question. It may > look dumb, > but I can not use the design view of Dreamweaver to edit the > .tpl files. > After I opened the .tpl file in Dreamweaver, only code view is > available. I can't select "Design" or "Code and Design" from > view menu. > I assume this must be some setting in DW. I was using plain > text editor > mostly and I am quite new to DW. Could someone give me some hint? > > Thank you very much, > > Jin > > > -- > Smarty General Mailing List (http://smarty.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.smarty.general (#5404) next »