[thelist] Enterprise site architecture/CMS question

Lonnie kr43m0r at earthlink.net
Thu Nov 13 14:18:05 CST 2003


> > One efficient way to handle static content is to write content pages
> > that
> > call the template - somewhat upsidedown as logic goes.

> They way it works is to have some templates that take the body content
> file's filename as a variable. Then the page itself passes that
> variable to the template. The body content file is yet another file.

[snip]

> Of course it's never exactly that easy, and this example is somewhat
> simplified. Basically, you get to avoid re-doing most of the content
> pages in the next redesign. The trade-off is that it's not intuitive
> for most people when they want to edit the content to have to look in a
> file that isn't the same name as the one their browser calls.
>
> Diane

I was referring to something a bit different. My method uses ASP. Here's a
very simplified explanation

The content pages simply sets some variables - like:

pagetitle="This is the page title"

etc.
and has a subroutine that contains the actual content:

<% sub pagecontent() %>
<p>This is the content of the page.</p>
<% end sub %>

and finally includes the template:

<!--#include file="template.asp"-->

template.asp then has placeholders for the variables:

<title><%= pagetitle %></title>

and a call to the subroutine to read the contents:

<% call pagecontent() %>





More information about the thelist mailing list