[thelist] 5-8 SSI Statements for Every Page for Sitewide Consistancy

Bill Moseley moseley at hank.org
Sun Feb 5 07:44:28 CST 2006

On Sun, Feb 05, 2006 at 12:23:41AM -0600, chase at ontask.net wrote:
> > normally you would not have a design like you describe where tags
> > open in one "component" and close in another.  Sounds like
> > trouble.
> What are some concrete examples of potential problems that I can use in 
> conversation with my non-techie supervisor?

It's funny how hard it is to convince people in power to do things right.

1) Broken html is more likely.
2) Future changes in one file could effect another file
3) Future maintenance headaches

> > Use nested templates/components.  If you must use tables (or not)
> > use a "layout" template that includes the sub-components of the
> > site.
> What are nested templates/components?

When one template or component or whatever is called from within

> What is a layout template?

A template where you define your site's structure.

Well, I'll invent a templating language on the fly, and I'm sure
others have different ways of doing things, but something like:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"

    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-US">
            <= include header.template =>
            <title><= page.title.html =></title>
            <= include page.javascript =>
            <= include page.css =>
            <div id="banner">
                <= include site.banner =>

            <div id="navigation">
                <= include site.navigation =>

            <div id="content">
                <= include page.content =>

Then, of course, those included templates (components?) might include
other templates.

You can see then you don't have the issue of opening and closing tags
in different files.

But, that's typically not my top-level page, either.   I normally
have a template page that looks at some aspect of the page to
determine which layout (above)  a given page might get (not every page on the
site will have the same layout, of course).

SSI might be too limiting for this, though.  That will be something
you have to look into.

Bill Moseley
moseley at hank.org

More information about the thelist mailing list