|
Posted by Stephen Kay on 04/05/06 03:05
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.
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.
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!
--
Stephen Kay
Karma-Lab sk@karma-lab.NOSPAM.com
^^^^^^^
Navigation:
[Reply to this message]
|