so the one main page would be something like...
<cfinclude template="header.cfm">
<cfinclude template="switcher.cfm">
<cfinclude template="footer.cfm">
thats it...
header.cfm would be the global header that is the same on every page as would the footer.cfm.
so header.cfm could be something like..
<html>
<head>
<title></title>
</head>
<body>
<img src="">
and footer.cfm could be ...
<img src=""> </body>
</html>
in these 2 templates would be the only time you need to write any of the code that is there. of course there would be alot more than this but you get the idea (i hope)
the switcher.cfm would be a series of case statements that decides which template to include in the "body" portion of the page depending on the _expression_ to evaluate (most people choose to use url vars)
<cfswtch _expression_="#url.action#">
<cfcase value="thread">
<cfinclude template="threads.cfm">
</cfcase>
<cfcase value="posts">
<cfinclude template="posts.cfm">
</cfcase>
<cfdefaultcase>
<cfinclude template="login.cfm">
</cfdefaultcase>
</cfswitch>
the less effort for updates and the addition of new sections the better if you ask me. There are other reasons I like to do this but this is the main one.
----- Original Message -----
From: Roberto Perez
To: CF-Talk
Sent: Tuesday, August 03, 2004 11:53 AM
Subject: Re: cf-based discussion board
At 11:59 AM 8/2/04, Ewok wrote:
>I wouldnt mind a few opinions on my board if anyone feels like being
>critical today :)
>
>http://4em2003.ned.bounceme.net
>
>It started out as a site-specific board but friends begged me to turn it
>into a portable app so I've been working on that whenever I can.
Just curious: after looking at a few message boards this past week, I
noticed that a few of them have different .cfm pages for different
functions (e.g., "viewmessage.cfm", "threadview.cfm", etc.). However, most
of them work like yours: there seems to be only 1 main page ("index.cfm"),
and all "functionalities" seem to be achieved via an "action" variable
passed through the url: "action="" "action="" "action="" etc.
Why is this a preferred method? Does it really use only 1 .cfm page (an
action page)? If it does, doesn't it slow things down to have only 1 page
parsed all the time for so many different functions (doesn't it overload
that page)?
Thanks,
Roberto Perez
[EMAIL PROTECTED]
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

