By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,569 Members | 1,394 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,569 IT Pros & Developers. It's quick & easy.

assembling dynamic pages, nested duplication of header-trailermaterial

P: n/a
Folks:

Using Dreamweaver CS3...

Consider a home page, "index.php" which conditionally REQUIREs one of 'N'
HTML files of pure content. All site styles are specified in a master CSS
file, "siteformatting.css"

The home page, "index.php" must link to the master CSS file, so that HTML
elements in this file can conform to site-wide standards, right? (Or
"index.php" should be modified to contain no HTML? See further below.)
Each of the 'N' content files must contain a link to the master CSS file;
this enables Dreamweaver to offer the site-wide styles when I edit them.

This scheme works consistently during authoring in Dreamweaver.

But: when a page is served up from my test host, the browser will see nested
duplication of header --and trailer-- material, including two identical
header links to "siteformatting.css". I've seen dire warnings about
nesting a valid HTML file within the body of another valid HTML file.

Yep, HTML Validator (latest: 0.8.5.2) extension to FireFox reports the
nested duplications with multiple warnings. The obvious way to deal with
this is to ignore the warnings. They aren't reported as errors, and thus far
in limited testing, I haven't seen any ill effects. But the "dire warnings"
seem to indicate this nested duplication could choke some browsers.

Or, I could to push all the HTML out of "index.php" into stand-alone HTML
files. But I'm reluctant about breaking up the home page into multiple
files. That seems very inconvenient for managing the site appearance. My
actual design is much more complex than the schematic description I'm giving
here. I think it would require a dozen or so HTML files, which seems very
inconvenient.

The only other option I can imagine is finding a way to persuade DW when it
opens a file for editing to pretend it sees HTML header and trailer material
--including the CSS link-- which aren't actually saved with the individual
files. Seems unlikely.

So, what's the "right" way to handle this?

TIA,

Henry

Nov 12 '08 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Do you have a link to this? I'd like to see specifically what's going
on.

Thanks,
Thomas

henry wrote:
Folks:

Using Dreamweaver CS3...

Consider a home page, "index.php" which conditionally REQUIREs one of 'N'
HTML files of pure content. All site styles are specified in a master CSS
file, "siteformatting.css"

The home page, "index.php" must link to the master CSS file, so that HTML
elements in this file can conform to site-wide standards, right? (Or
"index.php" should be modified to contain no HTML? See further below.)
Each of the 'N' content files must contain a link to the master CSS file;
this enables Dreamweaver to offer the site-wide styles when I edit them.

This scheme works consistently during authoring in Dreamweaver.

But: when a page is served up from my test host, the browser will see nested
duplication of header --and trailer-- material, including two identical
header links to "siteformatting.css". I've seen dire warnings about
nesting a valid HTML file within the body of another valid HTML file.

Yep, HTML Validator (latest: 0.8.5.2) extension to FireFox reports the
nested duplications with multiple warnings. The obvious way to deal with
this is to ignore the warnings. They aren't reported as errors, and thus far
in limited testing, I haven't seen any ill effects. But the "dire warnings"
seem to indicate this nested duplication could choke some browsers.

Or, I could to push all the HTML out of "index.php" into stand-alone HTML
files. But I'm reluctant about breaking up the home page into multiple
files. That seems very inconvenient for managing the site appearance. My
actual design is much more complex than the schematic description I'm giving
here. I think it would require a dozen or so HTML files, which seems very
inconvenient.

The only other option I can imagine is finding a way to persuade DW when it
opens a file for editing to pretend it sees HTML header and trailer material
--including the CSS link-- which aren't actually saved with the individual
files. Seems unlikely.

So, what's the "right" way to handle this?

TIA,

Henry
Nov 13 '08 #2

P: n/a
On Nov 12, 11:12*pm, 703designs <thomasmal...@gmail.comwrote:
Do you have a link to this? I'd like to see specifically what's going
on.

Thanks,
Thomas

henry wrote:
Folks:
Using Dreamweaver CS3...
Consider a home page, "index.php" which conditionally REQUIREs one of 'N'
HTML files of pure content. All site styles are specified in a master CSS
file, "siteformatting.css"
The home page, "index.php" must link to the master CSS file, so that HTML
elements in this file can conform to site-wide standards, right? (Or
"index.php" should be modified to contain no HTML? *See further below..)
Each of the 'N' content files must contain a link to the master CSS file;
this enables Dreamweaver to offer the site-wide styles when I edit them..
This scheme works consistently during authoring in Dreamweaver.
But: when a page is served up from my test host, the browser will see nested
duplication of header --and trailer-- material, including two identical
header links to "siteformatting.css". * *I've seen dire warnings about
nesting a valid HTML file within the body of another valid HTML file.
Yep, HTML Validator (latest: 0.8.5.2) extension to FireFox reports the
nested duplications with multiple warnings. The obvious way to deal with
this is to ignore the warnings. They aren't reported as errors, and thus far
in limited testing, I haven't seen any ill effects. *But the "dire warnings"
seem to indicate this nested duplication could choke some browsers.
Or, I could to push all the HTML out of "index.php" into stand-alone HTML
files. But I'm reluctant about breaking up the home page into multiple
files. That seems very inconvenient for managing the site appearance. My
actual design is much more complex than the schematic description I'm giving
here. I think it would require a dozen or so HTML files, which seems very
inconvenient.
The only other option I can imagine is finding a way to persuade DW when it
opens a file for editing to pretend it sees HTML header and trailer material
--including the CSS link-- which aren't actually saved with the individual
files. * Seems unlikely.
So, what's the "right" way to handle this?
TIA,
Henry
Never mind, I see what you're saying. The truth is, this is a problem
with Dreamweaver. What you need to do is get out of Design mode and
not let your application design be determined by your editor. Really,
there's not much that you get out of Design mode that you can't get by
just refreshing a browser window. It's not even very reliable, based
on my experience.

Thomas
Nov 13 '08 #3

P: n/a
Thomas:

Thanks for your response to my post:

<snip>
>
<snipI see what you're saying. The truth is, this is a problem
with Dreamweaver. What you need to do is get out of Design mode and
not let your application design be determined by your editor. Really,
there's not much that you get out of Design mode that you can't get by
just refreshing a browser window. It's not even very reliable, based
on my experience.

I think this kind of architecture must have been around for a while, it
isn't uncommon, and DW designers might have figured out a way to deal with
it. Maybe there is, I just haven't found the right DW magic!

Now that I have had time to think of my proposed solution, to unwind the
index page so all HTML is in included files, I think it probably won't work,
because I think you can't just put code like this alone in index.php:

<?php

if (condition1)
{
require("content1.html")
}
elseif (condition2)
{
require("content2.html")
}

...
else
{
require("contentn.html")
}

?>

Right? The file must contain some header and trailer material,yes? The only
ones I know about are <html<head... With </head</htmlfollowing, and
that's enough to create the problem -- as long as DW can't be persuaded to
use CSS that's not referenced in the current page.

In other words, I repeat, there doesn't seem to be any way of avoiding
nested headers.
There's also the possibility that I'm missing something incredibly obvious
about designing a dynamic site that sidesteps this issue.
That's the trouble with being self-taught, and working alone...

Thanks,

Henry

(remove the zzz)

>>
henry wrote:
>>Folks:
>>Using Dreamweaver CS3...
>>Consider a home page, "index.php" which conditionally REQUIREs one of 'N'
HTML files of pure content. All site styles are specified in a master CSS
file, "siteformatting.css"
>>The home page, "index.php" must link to the master CSS file, so that HTML
elements in this file can conform to site-wide standards, right? (Or
"index.php" should be modified to contain no HTML? *See further below.)
>>Each of the 'N' content files must contain a link to the master CSS file;
this enables Dreamweaver to offer the site-wide styles when I edit them.
>>
>>This scheme works consistently during authoring in Dreamweaver.
>>But: when a page is served up from my test host, the browser will see nested
duplication of header --and trailer-- material, including two identical
header links to "siteformatting.css". * *I've seen dire warnings about
nesting a valid HTML file within the body of another valid HTML file.
>>Yep, HTML Validator (latest: 0.8.5.2) extension to FireFox reports the
nested duplications with multiple warnings. The obvious way to deal with
this is to ignore the warnings. They aren't reported as errors, and thus far
in limited testing, I haven't seen any ill effects. *But the "dire warnings"
seem to indicate this nested duplication could choke some browsers.
>>Or, I could to push all the HTML out of "index.php" into stand-alone HTML
files. But I'm reluctant about breaking up the home page into multiple
files. That seems very inconvenient for managing the site appearance. My
actual design is much more complex than the schematic description I'm giving
here. I think it would require a dozen or so HTML files, which seems very
inconvenient.
>>The only other option I can imagine is finding a way to persuade DW when it
opens a file for editing to pretend it sees HTML header and trailer material
--including the CSS link-- which aren't actually saved with the individual
files. * Seems unlikely.
>>So, what's the "right" way to handle this?
>>TIA,
>>Henry

Nov 14 '08 #4

P: n/a
I always thought that Dreamweaver was smart enough to handle includes
and what not. In your site settings, do you have DW seeing your local
server? I just set up a site here and it seems weak with
includes...although DW sees my local server (URL tests fine) a simple
nav.php include does not appear in Design mode.

My advice is to just code the HTML by hand (I can't speak for DW's
effectiveness as an editor, but it seems to fall short here), which
I've been doing for ages now. You get better results when you do so.

Thomas

On Nov 14, 12:28*am, henry <henry.zzzab...@gmail.comwrote:
Thomas:

Thanks for your response to my post:

<snip>
<snipI see what you're saying. The truth is, this is a problem
with Dreamweaver. What you need to do is get out of Design mode and
not let your application design be determined by your editor. Really,
there's not much that you get out of Design mode that you can't get by
just refreshing a browser window. It's not even very reliable, based
on my experience.

I *think this kind of architecture must have been around for a while, it
isn't uncommon, and DW designers might have figured out a way to deal with
it. *Maybe there is, I just haven't found the right DW magic!

Now that I have had time to think of my proposed solution, to unwind the
index page so all HTML is in included files, I think it probably won't work,
because I think you can't just put code like this alone in index.php:

* <?php

* if (condition1)
* {
* * require("content1.html")
* }
* * elseif (condition2)
* {
* * require("content2.html")
* }

* *...
* else
* {
* * *require("contentn.html")
* }

* ?>

Right? The file must contain some header and trailer material,yes? *Theonly
ones I know about are <html<head... With *</head</htmlfollowing, and
that's enough to create the problem -- as long as DW can't be persuaded to
use CSS that's not referenced in the current page.

In other words, I repeat, there doesn't seem to be any way of avoiding
nested headers.

There's also the possibility that I'm missing something incredibly obvious
about designing a dynamic site that sidesteps this issue.

That's the trouble with being self-taught, and working alone...

Thanks,

Henry

(remove the zzz)
henry wrote:
Folks:
>Using Dreamweaver CS3...
>Consider a home page, "index.php" which conditionally REQUIREs one of'N'
HTML files of pure content. All site styles are specified in a masterCSS
file, "siteformatting.css"
>The home page, "index.php" must link to the master CSS file, so that HTML
elements in this file can conform to site-wide standards, right? (Or
"index.php" should be modified to contain no HTML? *See further below.)
>Each of the 'N' content files must contain a link to the master CSS file;
this enables Dreamweaver to offer the site-wide styles when I edit them.
>This scheme works consistently during authoring in Dreamweaver.
>But: when a page is served up from my test host, the browser will seenested
duplication of header --and trailer-- material, including two identical
header links to "siteformatting.css". * *I've seen dire warnings about
nesting a valid HTML file within the body of another valid HTML file.
>Yep, HTML Validator (latest: 0.8.5.2) extension to FireFox reports the
nested duplications with multiple warnings. The obvious way to deal with
this is to ignore the warnings. They aren't reported as errors, and thus far
in limited testing, I haven't seen any ill effects. *But the "dire warnings"
seem to indicate this nested duplication could choke some browsers.
>Or, I could to push all the HTML out of "index.php" into stand-alone HTML
files. But I'm reluctant about breaking up the home page into multiple
files. That seems very inconvenient for managing the site appearance.My
actual design is much more complex than the schematic description I'mgiving
here. I think it would require a dozen or so HTML files, which seems very
inconvenient.
>The only other option I can imagine is finding a way to persuade DW when it
opens a file for editing to pretend it sees HTML header and trailer material
--including the CSS link-- which aren't actually saved with the individual
files. * Seems unlikely.
>So, what's the "right" way to handle this?
>TIA,
>Henry
Nov 14 '08 #5

This discussion thread is closed

Replies have been disabled for this discussion.