Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

How to edit templates in Dreamweaver

 
Reply
   X-Cart forums > Forum FAQs and guides
 
Thread Tools Search this Thread
  #11  
Old 12-09-2002, 08:57 AM
 
bob bob is offline
 

Newbie
  
Join Date: Dec 2002
Posts: 2
 

Default 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.
Reply With Quote
  #12  
Old 12-09-2002, 01:53 PM
  minorgod's Avatar 
minorgod minorgod is offline
 

X-Adept
  
Join Date: Sep 2002
Location: Arivaca, AZ
Posts: 402
 

Default 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.
Reply With Quote
  #13  
Old 03-25-2003, 06:18 AM
 
guytje guytje is offline
 

Advanced Member
  
Join Date: Nov 2002
Posts: 50
 

Default 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
Reply With Quote
  #14  
Old 05-04-2003, 03:06 PM
  groovico's Avatar 
groovico groovico is offline
 

X-Man
  
Join Date: Apr 2003
Location: Firetanksoftware.com
Posts: 2,326
 

Default Re: An easier way...

Quote:
Originally Posted by guytje
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

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
Reply With Quote
  #15  
Old 05-05-2003, 07:46 AM
  minorgod's Avatar 
minorgod minorgod is offline
 

X-Adept
  
Join Date: Sep 2002
Location: Arivaca, AZ
Posts: 402
 

Default

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.
Reply With Quote
  #16  
Old 05-11-2006, 06:47 AM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

http://smartydwt.klitsche.org/
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
Reply
   X-Cart forums > Forum FAQs and guides



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 08:41 AM.

   

 
X-Cart forums © 2001-2020