PDA

View Full Version : edit display is correct, preview & live pages display wrong


RainForest
03-09-2009, 05:42 PM
Hello,

I've *finally* created my first template with a "global" css sheet attached to it, and created a bunch of pages using the template. Well into all this, I decided I wanted to change the color and font style of the h1, h2, & h3 headers, so I did, in my global.css sheet.

When I am editing my pages, they display with the new font style and color; however, when I preview the pages, and on the live web pages, the font color and style remains in the old color and style.

Note: The pages were loaded for the first time AFTER I made the changes.

What have I missed? Why are my preview and live pages not picking up the new color & style?

Thanks.

Ricky55
03-09-2009, 08:03 PM
Just make sure you have uploaded everything to your server.

Also try to empty your browsers cache.

RainForest
03-25-2009, 12:41 AM
First, to respond to Ricky55, 1) yes, *everything* was uploaded - the entire site was uploaded all at the same time, and 2) I've got my browser set to empty the cache each time it's closed. The problem is there *before* I get the pages live - they're not even previewing right in the browser (I've tried both IE and FF), only in DW...

I've been waiting to respond, hoping someone would have a different suggestion. However, now I have a similar thing happening with a different site. Starting from scratch, I created a new template. I made several pages off the template, and everything was fine. Then I decided to add a background image to the template. I saved the template after adding the background image. The template looks beautiful and previews correctly in my browser.

But when I try to create a new page off the template, the background image isn't there. So why not?

I strongly suspect these two incidents are connected...

Corrosive
03-25-2009, 08:49 AM
First, to respond to Ricky55, 1) yes, *everything* was uploaded - the entire site was uploaded all at the same time, and 2) I've got my browser set to empty the cache each time it's closed. The problem is there *before* I get the pages live - they're not even previewing right in the browser (I've tried both IE and FF), only in DW...

I've been waiting to respond, hoping someone would have a different suggestion. However, now I have a similar thing happening with a different site. Starting from scratch, I created a new template. I made several pages off the template, and everything was fine. Then I decided to add a background image to the template. I saved the template after adding the background image. The template looks beautiful and previews correctly in my browser.

But when I try to create a new page off the template, the background image isn't there. So why not?

I strongly suspect these two incidents are connected...

A URL would be really useful right about now.

RainForest
03-26-2009, 12:21 AM
I have the new issue figured out. The resolution was that when I added the
background, it became a new style on that document only. As soon as I moved the style to the global.css sheet, new pages came up correctly.

As far as the original issue, well, I printed out the style sheet and then detached it from the template, saved the template, deleted the style sheet from the site, and then re-created it from scratch and attached the new one to the template. Now all the pages are displaying correctly. I still don't know what caused that problem. Guess it will remain a mystery...

But here's another related issue: On one site (both sites have pages built off a "global" template), I can change the page title (not the document name) on every page, but on the other site when I try to change the title, it "snaps back" to what's on the template. Why is this, and how can I enable editing of the title? The site that lets me edit is not up yet, but here's a link to the site that won't let me edit the title: http://tinyurl.com/carcm3

Corrosive
03-26-2009, 11:17 AM
I have the new issue figured out. The resolution was that when I added the
background, it became a new style on that document only. As soon as I moved the style to the global.css sheet, new pages came up correctly.

As far as the original issue, well, I printed out the style sheet and then detached it from the template, saved the template, deleted the style sheet from the site, and then re-created it from scratch and attached the new one to the template. Now all the pages are displaying correctly. I still don't know what caused that problem. Guess it will remain a mystery...

But here's another related issue: On one site (both sites have pages built off a "global" template), I can change the page title (not the document name) on every page, but on the other site when I try to change the title, it "snaps back" to what's on the template. Why is this, and how can I enable editing of the title? The site that lets me edit is not up yet, but here's a link to the site that won't let me edit the title: http://tinyurl.com/carcm3

Hello. Try going into your original template and where you have your page title ...

<title>SASWS - Shamans and Spirit Warriors Society:Home</title>

Try changing it to...

!-- InstanceBeginEditable name="doctitle" -->
<title>SASWS - Shamans and Spirit Warriors Society:Home</title>
<!-- InstanceEndEditable -->

This puts the title in an editable region and will allow different titles on each page.

Hope this helps.

RainForest
03-26-2009, 10:37 PM
Thanks for the suggestion, Corrosive. When I tried to change the code as you suggested, DW locked me out of changing it in the template. So I looked at the code in a couple of different pages.

The code on the page you looked at, for reasons I don't know, is different from the code in the template, *and* it's also different from other pages in the site. Maybe I didn't apply the template to the index page, I don't remember.

Here's the doctype plus full header code from the template:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>SASWS</title>

<style type="text/css">
<!--
-->
</style>
<link href="../global.css" rel="stylesheet" type="text/css" />
<!-- TemplateParam name="OptionalRegion1" type="boolean" value="true" --><!-- TemplateParam name="OptionalRegion2" type="boolean" value="true" --><!-- TemplateParam name="TITLE" type="text" value="" -->
</head>


and here's the doctype and full header code from another page made off the template:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/global.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>SASWS</title>


Also, the template had had a line in the header that was something like <@@TITLE@@>. I took it out before writing it down, so that might not be exactly what it was, but removing that still doesn't allow me to edit the title on pages made off the template.

Corrosive
03-27-2009, 10:41 AM
Thanks for the suggestion, Corrosive. When I tried to change the code as you suggested, DW locked me out of changing it in the template. So I looked at the code in a couple of different pages.

The code on the page you looked at, for reasons I don't know, is different from the code in the template, *and* it's also different from other pages in the site. Maybe I didn't apply the template to the index page, I don't remember.

Here's the doctype plus full header code from the template:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>SASWS</title>

<style type="text/css">
<!--
-->
</style>
<link href="../global.css" rel="stylesheet" type="text/css" />
<!-- TemplateParam name="OptionalRegion1" type="boolean" value="true" --><!-- TemplateParam name="OptionalRegion2" type="boolean" value="true" --><!-- TemplateParam name="TITLE" type="text" value="" -->
</head>


and here's the doctype and full header code from another page made off the template:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/global.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>SASWS</title>


Also, the template had had a line in the header that was something like <@@TITLE@@>. I took it out before writing it down, so that might not be exactly what it was, but removing that still doesn't allow me to edit the title on pages made off the template.

Strange that DW is not letting you add editable regions in the template itself. It should as this is your base file for the design of your whole site. I must admit though, they can be difficult to work out. Have you tried highlighting the title and then using insert > template objects > editable region?

Other than that you may have to re-trace your steps and see which pages have the template applied and which don't. When working from templates it is good to get into the habit of either creating a new page from the template or applying it to the page as the first thing you do. That way you can be sure you have done it.

Some general advice is that you should really make sure your template is almost exactly as you want/need it before starting to create your site pages. This should include making sure that titles, descriptions and any other tags in your <head> area are in editable regions. Ensure you know what all your editable regions will be i.e. the main content of your site will change from page to page so this needs to be an editable region.

In your case you might have to start again with a more methodical approach I'm afraid.

RainForest
03-31-2009, 12:54 AM
Corrosive,

Thanks for the info. I did have the template mostly done before I started building pages, and I did build all the pages off the template, just as I thought I had. But it was my understanding that if I updated the template, it would update the pages built off the template as well. And while DW offers to do this, it doesn't seem to do it right, as I've discovered on the other site I'm authoring.

In any event, what I ended up doing was detaching the template from the index page, and then saved it as "template.html" and used it as a starting point for all the pages. Since I am the only one working on the site, there's no worry about somebody else changing areas of the template, and then I don't have to worry about whether or not I can edit the title, or anything else, for that matter.

This worked beautifully for me! I overhauled the entire site and recreated all the pages, and while it was a lot of work and it's not perfect (some of the pages display the "editable" cell too large, and I had a real hard time getting margins to work properly - ended up with a workaround of creating a class style that was simply 20px margins on left and right, and applying it to the "editable" text, which was a huge pain because it caused the text to behave oddly), I'm very happy that it's done and the pages look nice. Eventually, I'll probably be posting for some help with a spry menu, because I've got one item in the menu that I want to add a drop down to, and spry & I don't seem to get along too well together so far...

Anyway, thanks to everyone who responded. I appreciate your help.