Just a nit-pick (and no answer to what is going wrong) - but you dont need the ## around the URL.include in the way you have used it. They are only required when you want CF to expand the contents of a variable in <CFOUTPUT></CFOUTPUT> or inside quotes.
And yes - as has already been suggested, you cant set the value of the URL.include at the top of your file or it overrides it. Use <CFPARAM> instead. You may also want to think about doing it this way...... <CFPARAM name="URL.include" default="news_links"> <CFINCLUDE template="includes/#URL.include#.cfm"> Then you wont have to constantly edit your <CFIF> cluster if you add more options for the "include" portion. Of course, if you pass something that does not exist then you will get an error. So you could do a <CFIF> to check that the file exists and complain with an error if it doesn't - otherwise <CFINCLUDE> it. Gary Menzel IT Operations Brisbane -+- ABN AMRO Morgans Limited Level 29, 123 Eagle Street BRISBANE QLD 4000 PH: 07 333 44 828 FX: 07 3834 0828 [EMAIL PROTECTED] wrote on 06/20/2003 10:49:20 AM: > Hi all, > > Trying to get my head around dynamic includes. > > I've got my index.cfm page which holds a few includes. One of those is our > "news.cfm". Now I want to replace my "news.cfm" when a graphic link is > clicked to then include our "custOps_shout.cfm" > > So my graphic link is <a href="../index.cfm?include=custOps_shout">Click > here</a> > > I'm starting out like so: > > <cfset #URL.include# = ""> > > <cfif #URL.include# IS "custOps_shout"> > <cfinclude template="includes/custOps_shout.cfm"> > <cfelse> > <cfinclude template="includes/news_links.cfm"> > </cfif> > > I get no errors but the custOps_shout file won't render?? I do a dump of the > URL variables and I get an empty string?? Why?? > > If I remove the <cfset> I get the usual URL element is undefined error, so I > need something in this page before the link is clicked to declare > URL.include is nothing. > > How do I get around this?? > > > > ********************************************************************** > A new world of colour, sound and pictures awaits you: > Vodafone Live! More details at http://www.vodafone.com.au/live/ > > **********************************************************************" > This correspondence is for the named person's use only. It may > contain confidential or legally privileged information or both. " > No confidentiality or privilege is waived or lost by any " > mistransmission. If you receive this correspondence in error, please > immediately delete it from your system and notify the sender. You > must not disclose, copy or rely on any part of this correspondence > if you are not the intended recipient. > > Any views expressed in this message are those of the individual sender, > except where the sender expressly, and with authority, states them to > be the views of Vodafone. > > This email has been checked for viruses. > ********************************************************************** > > > --- > You are currently subscribed to cfaussie as: [EMAIL PROTECTED] > To unsubscribe send a blank email to [EMAIL PROTECTED] > > MX Downunder AsiaPac DevCon - http://mxdu.com/ **************************************************************************** If this communication is not intended for you and you are not an authorised recipient of this email you are prohibited by law from dealing with or relying on the email or any file attachments. This prohibition includes reading, printing, copying, re-transmitting, disseminating, storing or in any other way dealing or acting in reliance on the information. If you have received this email in error, we request you contact ABN AMRO Morgans Limited immediately by returning the email to [EMAIL PROTECTED] and destroy the original. We will refund any reasonable costs associated with notifying ABN AMRO Morgans. This email is confidential and may contain privileged client information. ABN AMRO Morgans has taken reasonable steps to ensure the accuracy and integrity of all its communications, including electronic communications, but accepts no liability for materials transmitted. Materials may also be transmitted without the knowledge of ABN AMRO Morgans. ABN AMRO Morgans Limited its directors and employees do not accept liability for the results of any actions taken or not on the basis of the information in this report. ABN AMRO Morgans Limited and its associates hold or may hold securities in the companies/trusts mentioned herein. Any recommendation is made on the basis of our research of the investment and may not suit the specific requirements of clients. Assessments of suitability to an individual's portfolio can only be made after an examination of the particular client's investments, financial circumstances and requirements. **************************************************************************** --- You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] MX Downunder AsiaPac DevCon - http://mxdu.com/
