|
Posted by Jerry Stuckle on 04/05/06 04:36
Stephen Kay wrote:
> in article m6adnXzMRsEhX6_ZRVn-pA@comcast.com, Jerry Stuckle at
> jstucklex@attglobal.net wrote on 4/4/06 4:02 PM:
>
>
>>Nope. The page itself contains only information specific to that page, i.e.
>>
>><!DOCTYPE ...>
>><html>
>><head>
>><title>...</title>
>><meta...>
>><?php include('header file location')
>>
>>The header file contains common header elements, the </HEAD> and <BODY> tags
>>plus the rest of the header.
>>
>>
>>Next comes the page-specific content
>>
>>This is followed by an include for the footer - which finishes the document.
>>
>>So - formatting for every page can be changed by simply changing the
>>header/footer page.
>
>
>
> I see. Yes, now that I think about it, you could do it that way too. You
> basically are creating a template out of the two pieces of the header and
> the footer, and chopping them in half, and the content area (which is on the
> main page) ends up in the middle, say inside a table cell.
>
> That would be a good way for a site you are writing from scratch.
>
Yep, except I don't use tables for content. I use tables for tables :-).
Also, each page has it's own static URL; I don't need to use GET or POST parms
to identify the page.
> But for my task at hand, which is "turn a straight HTML site with 100+ pages
> into a dynamically served php site with consistent header, navbar, footer
> areas, without rewriting, editing and renaming every page", this way works
> better/easier.
>
> (Because, in your case, every page needs to end in .php. In my case, they
> can just stay as .html pages. So most of them don't even need to be touched.
> They just work in the new format.) And most of the existing search engine
> links and links on other site's pages that point to the site still work.
>
No, they don't *have* to end in .php. That was an example. For the ones which
don't need php code, I can use SSI to include the header and footer.
> I accept that there's some risk of things breaking. Someday I'll rewrite the
> whole thing from scratch. But that wasn't the goal at this point.
>
> But thanks for the tips!
>
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
[Back to original message]
|