When dealing with structures (or XML since most of the time XML
objects can be dealt with like you deal with structures) a good rule
of thumb is to us the . (request.page_id) when you know what you are
looking for and to use the [] (request[something]) when you are using
a variable to evaluate what you are looking for, so in
request[something] something would be a vadiable containing page_id.
Hope that helps.
Adam H
On Tue, 18 Jan 2005 09:58:52 -0000, James Smith <[EMAIL PROTECTED]> wrote:
> OK, well while on the subject of doing things the correct way, how would you
> set this value?
>
> <cfset "config.siteConfig.siteSections.#url.SectionName#.XMLText" = True>
>
> works, but is there a better/cleaner way?
>
> > > Yey, <cfif
> > > IsDefined("Config.SiteConfig.SiteSections.#Sections.Name#")>
> > > works fine!
> >
> > <cfif structKeyExists(config.siteConfig.siteSections,sections.name)>
> >
> > Faster, safer. Do a Google search for isDefined and CGI scope
> > to see why structKeyExists is better.
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:190903
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54