But...since I'm using a unique <CFAPPLICATION> Name for each business
by identifying the domain name when the index.cfm page is first requested,
can't I use an application variable, say Application.Topgraphic, as my
persisting
variable, thereby eliminated the need to query the database for all the
business-specific
info everytime the application.cfm page is visited without risk of users on
the site
visiting different businesses receiving the wrong graphics/info?

Or would querying for the info everytime a new page is visited and
reassigning
the Request variables still be preferable?

Rick

-----Original Message-----
From: Rick Faircloth [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 04, 2002 9:30 PM
To: CF-Talk
Subject: RE: Follow-up on the one-site for many businesses discussion


Oops, sorry.

Just remembered the whole reason for using Request variables...
they don't persist past the page request and force redefining.

So much to remember, so few brain cells activated...

Rick

-----Original Message-----
From: Rick Faircloth [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 04, 2002 9:27 PM
To: CF-Talk
Subject: RE: Follow-up on the one-site for many businesses discussion


Well, it seems like I'm deceived...

When I tested for the existence of #App_TopGraphic#
on the application.cfm page, it didnt showup.

Sure enough, when I took out the <CFPARAM Name="App_TopGraphic" Default="">
line, I got an error that the variable didn't exist.

So...I need persistent variables to define site parameters, and those should
be Request scope variable which are persistent, and which if are not
defined,
are queried for and redefined per page visit.

If I had just tested my theory before all that typing the previous
message...whew.

Rick



-----Original Message-----
From: Rick Faircloth [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 04, 2002 8:02 PM
To: CF-Talk
Subject: Follow-up on the one-site for many businesses discussion


Hello, everyone.

This is follow-up to the questions I had about using one set of pages and
code to function as the site for many different businesses.

I know we discussed using Request scope variables to define
common graphics, etc., for the entire site so that the graphics
would be defined with every page request in the application.cfm file.
To define the Request scope variables I am having to append the BusinessID
to every link in the site.  Quite a pain...

However, that was when I was using a single <CFAPPLICATION> Name
for the application, no matter what Business was defined by the BusinessID
for the app.

I have since made the <CFAPPLICATION> Name dynamic, defining it
as Name="RentalCompanies#BusinessID#".

My question is this, now that the <CFAPPLICATION> Name is unique for every
company,
is it necessary to use Request scope variables that have to query and
redefine the site
variables, such as TopGraphic, for every page visit?  Seems like a lot of
querying, if the
application.cfm has to query for the TopGraphic with each visit to the
application.cfm page.

Seems like now, with a dynamic <CFAPPLICATION> Name, I should be able to
pick up the
BusinessID once, (laster, when domains are purchased, I'll define the
businesses according
to the domain name) when the index.cfm is first visited, and use that
BusinessID
to query for the graphics, etc. appropriate to that business, and not have
to define that
variable with each visit to the application.cfm.  I could simply check on
the application.cfm
to see if the BusinessID has been defined (after having assigned the initial
URL.BusinessID
variable from the index.cfm URL to a common variable, such as
"App_BusinessID".

Does this seem right?  Am I missing some functional aspect of CF that makes
using Request scope
variables necessary or more desirable, and have them defined with each visit
to the application.cfm?

What about non-scoped variables, such as "App_BusinessID", or
"App_BusinessAddress" and
use them throughout the site?  I changed the variable to define the top
graphic for each page
to App_TopGraphic on the application.cfm page and with each visit to the
application.cfm page
from other pages, the definition of App_TopGraphic is checked.  If it turns
out for some reason that
App_TopGraphic is "", then the query defining App_TopGraphic is run again,
according to the BusinessID.

That seems to work, even though it's not "persistant" scope variable.  Are
non-scoped variables
available to every page, too?

Sorry this is so long.  Bear with me, please,
I think I'm just about finished with the questions on this topic.  :o)

Rick

Rick Faircloth,
Prism Productions




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.

Reply via email to