Print Page | Close Window

ProductCart format and Dreamweaver Templates

Printed From: ProductCart E-Commerce Solutions
Category: ProductCart
Forum Name: Using ProductCart
Forum Description: Running your store with ProductCart
URL: https://forum.productcart.com/forum_posts.asp?TID=3733
Printed Date: 21-June-2024 at 1:42am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: ProductCart format and Dreamweaver Templates
Posted By: alexL-icc
Subject: ProductCart format and Dreamweaver Templates
Date Posted: 24-May-2010 at 2:55pm
Hey all,

I am running into difficulties using Dreamweaver templates with the format with which ProductCart wants users to structure their sites.

So, the code for all of our pages is supposed to look in general like this:

<!--#include file="header.asp"-->          
... code and content for individual page goes here...   
<!--#include file="footer.asp"-->


But, when I used this format with Dreamweaver templates, I had problems with my page displaying in Internet Explorer 8. Namely, the margin:auto CSS declaration was being ignored and many of my page elements were floated to the left instead of being centered.

This is how it happens, as I've understood from my internet research. When building the template, Dreamweaver is supposed to find the <head> tag and put the following code before it: <!-- InstanceBegin template="/Templates/template-name.dwt.asp" codeOutsideHTMLIsLocked="false" -->.

But instead, since the documents I am working with do not have a <head> tag but rather <!--#include file="header.asp"--> instead, Dreamweaver puts the <!-- InstanceBegin template... --> tag before the <!--#include-->.

This means that the InstanceBegin is put by Dreamweaver at the beginning, in effect, of the entire HTML document. The template's InstanceBegin tag goes even before the <!DOCTYPE> declaration, and that's where problems with Internet Explorer come in.

Internet Explorer requires, as I understand, that the <!DOCTYPE> be the first tag in an HTML file. Otherwise, it goes into Quirks Mode and CSS declarations like magin:auto do not display properly.

But, since ProductCart requires that we use <!--#include--> tags for our header and footer, I can't seem to find a way to make Dreamweaver templates work properly in Internet Explorer.

Can anybody help? I would greatly appreciate it.

-------------
Alex L.



Replies:
Posted By: Guests
Date Posted: 24-May-2010 at 5:25pm
Hi Alex,

PC's use of Server Side Includes for the site theme basically makes the need for DW templates obsolete, the way I see it. It enables you to accomplish the same thing and much more than using templates.


Posted By: intour
Date Posted: 25-May-2010 at 8:43am
Sean is right - the header.asp and footer.asp files are effectively your productcart template. You don't need to use dreamweaver for your content pages unless you want to use static  html pages in which caase you dont need header.asp and footer.asp.
 
Use the content manager to populate them. You can create your central content in dreamweaver if you prefer and then copy the source code into the content management system - just be careful of the paths to your image and media files.
 
Nigel


-------------
http://www.innerview.co.uk - Innerview
Productcart Platinum Reseller
Web Design/Hosting/Virtual Tours



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net