| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | Mark Forums Read | User manuals | Login |
How to edit templates in Dreamweaver | ||||
|
|
Thread Tools | Search this Thread |
#11
|
|||||||
|
|||||||
Can't get Smarty to work in Dreamweaver
mg, I followed the instructions from your last post, however, I can't seem to get Dreamweaver MX to show smarty code as anything other than icons. Also, when I view a template in the browser (through Dreamweaver) I see nothing but code.
Do I need to copy the Smarty folder to some root directory? Do I need to edit another Dreamweaver config file somewhere? Any insite would be greatly appreciated. |
|||||||
#12
|
|||||||||
|
|||||||||
sounds right...
I think you probably did it correctly, but you're expecting a bit too much from Dreamweaver. Dreamweaver won't render the actual SMARTY code, but should just display raw smarty code as if it were HTML. Only the non-smarty parts of your templates will render properly as HTML. Basically, this lets you create an HTML file with a .tpl extension, or to view an HTML file with a .tpl extension. Any code that is not part of an HTML tag will show up as text. So it's not a total WYSIWYG solution, but it's better than nothing. You should at least be able to change the layout of your pages and drag bits of SMARY code around the page to place it in different locations in your template. Regardless of how it appears in Dreamweaver, you'll still need a good understanding of SMARY tags if you hope to be able to modify the templates. To make the actual SMARTY code markup render in DreamweaverMX would require writing an entire server model that could properly enterpret all the various SMARTY tags. While you could probably build one based on the PHP server model, I doubt anyone other than serious SMARTY / Dreamweaver extension developers could attempt such a feat. I've built some DreamweaverMX extensions for the PHP-MySQL server model and I can assure you, it would be difficult (but not impossible) to write an extension that would render SMARTY tags.
__________________
www.brettbrewer.com Getting back into x-cart dev after a long hiatus. Modded lots of x-carts from version 3.1.x to 4.1.x. Developer of ImageScaler mod, Pre-login per user coupon mod, Wordpress feed mod, DigitalSubscriptions mod, Phonetic bulk download keys addon for DownloadExpander mod, Serial Number Generator for ESD products, Custom CMS/LMS integrations, external products mod, and more. |
|||||||||
#13
|
|||||||
|
|||||||
An easier way...
Maybe an easyer way (always works):
You can also rename the tpl to tpl.html and then just open them in dreamweaver... no worries! Just be sure that when copying it back the the server he doesn't put a </p> tag at the first line... AND also: alsways make regular backup copies of correct pages. Cheers, Guy |
|||||||
#14
|
|||||||||
|
|||||||||
Re: An easier way...
Quote:
Nope better yet rename it to .php as dreamweaver will not alter the code then at all. Also change the URL rewriting in preferences to avoided having dreamweaver re-write your coded links |
|||||||||
#15
|
|||||||||
|
|||||||||
It seems like different versions of DreamweaverMX might be behaving differently, but the instructions I posted above seem to work great on both my home and work copies.
It sounds like you still need to add the .tpl extension to your list of default editors in your DreamweaverMX prefs. Open your prefs menu in dreamweaver... edit-->preferences-->file types/editors Now add the .tpl file extension to the list on the left, and associate it with Dreamweaver by adding dreamweaver to the editors list on the right. Click done. You're done. Now you should be able to open those pesky .tpl files.
__________________
www.brettbrewer.com Getting back into x-cart dev after a long hiatus. Modded lots of x-carts from version 3.1.x to 4.1.x. Developer of ImageScaler mod, Pre-login per user coupon mod, Wordpress feed mod, DigitalSubscriptions mod, Phonetic bulk download keys addon for DownloadExpander mod, Serial Number Generator for ESD products, Custom CMS/LMS integrations, external products mod, and more. |
|||||||||
#16
|
|||||||||
|
|||||||||
__________________
Looking for a reliable X-cart host ? You wont go wrong with either of these. EWD Hosting Hands On Hosting |
|||||||||
|
Thread Tools | Search this Thread |
|
|
|
|||
X-Cart forums © 2001-2020
|