I'm confused about what your asking. Your two options are to convert the
CFSWITCH tag into a CFSCRIPT based code, then add the "all" case and the if
statement to each case. Or, put a cfloop (list type) around your CFSWITCH
tag. The downside to the loop is that your have to pass every case value to
the loop. If you add a case to the switch you need to add it to the list. I
don't like that from a maintainability standpoint. I would use the CFSCRIPT
version.

- Daniel


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Jake McKee
Sent: Sunday, April 24, 2005 2:34 PM
To: [email protected]
Subject: Re: Outputting all content from CFSWITCH

So basically, you're saying that I'd set up a CFSCRIPT like this at the 
top of my doc with the CFSWITCH, add each case to that CFSCRIPT, then 
output the "single" CFCASE of "all"?

I don't necessarily mind CFLOOPs... how would that work?

Jake

Daniel Elmore wrote:

>Actually I just had a mind glitch, the switch can only receive one value
but
>the cases can bind to multiple values. So, you would need to do something
>like this:
>
><cfscript>
>switch(variable)
>{
>       case "value1": case "all":
>               //display something
>               if(variable != "all")
>                       break;
>
>       case "value2": case "all":
>               //display something else
>               if(variable != "all")
>                       break;
>       
>       default:
>               //display default display
>}
></cfscript>
>
>Well it's not as pretty anymore. But if you really want this functionality
>built into the switch and want to avoid loops, then this is probably the
>best way to go.
>
>-Daniel Elmore
>
>-----Original Message-----
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
>Of Jake McKee
>Sent: Sunday, April 24, 2005 1:45 PM
>To: [email protected]
>Subject: Re: Outputting all content from CFSWITCH
>
>I'm not very good with CFSCRIPT - would you mind providing an example? 
>Thanks so much!
>
>Daniel Elmore wrote:
>
>  
>
>>A break command is built into the CFCASE tag, so even if you passed in a
>>list of all CASEes it would break after the first match. However, if you
>>    
>>
>use
>  
>
>>CFSCRIPT and build your switch there, you have to explicitly state your
>>break commands after every case. So the list would work.
>>
>>So convert the page to CFSCRIPT.
>>
>>
>>-----Original Message-----
>>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
>>Of Jake McKee
>>Sent: Sunday, April 24, 2005 11:06 AM
>>To: [email protected]
>>Subject: Outputting all content from CFSWITCH
>>
>>
>>I have a help file that is broken out into separate CFCASE statements. 
>>(On each page of the admin, the appropriate CFCASE is read in to display 
>>the contextual correct help content).
>>
>>I'd like to be able to output all help on one page ... how can I output 
>>every CFCASE statement on one page without having to manually code each 
>>separate CFCASE output?
>>
>>Thanks!
>>Jake
>>
>>----------------------------------------------------------
>>To post, send email to [email protected]
>>To unsubscribe: 
>>  http://www.dfwcfug.org/form_MemberUnsubscribe.cfm
>>To subscribe: 
>>  http://www.dfwcfug.org/form_MemberRegistration.cfm
>>
>>
>>
>>----------------------------------------------------------
>>To post, send email to [email protected]
>>To unsubscribe: 
>>  http://www.dfwcfug.org/form_MemberUnsubscribe.cfm
>>To subscribe: 
>>  http://www.dfwcfug.org/form_MemberRegistration.cfm
>>
>>
>>
>>
>>
>>
>> 
>>
>>    
>>
>
>----------------------------------------------------------
>To post, send email to [email protected]
>To unsubscribe: 
>   http://www.dfwcfug.org/form_MemberUnsubscribe.cfm
>To subscribe: 
>   http://www.dfwcfug.org/form_MemberRegistration.cfm
>
>
>
>----------------------------------------------------------
>To post, send email to [email protected]
>To unsubscribe: 
>   http://www.dfwcfug.org/form_MemberUnsubscribe.cfm
>To subscribe: 
>   http://www.dfwcfug.org/form_MemberRegistration.cfm
>
>
>
>
>
>
>  
>

----------------------------------------------------------
To post, send email to [email protected]
To unsubscribe: 
   http://www.dfwcfug.org/form_MemberUnsubscribe.cfm
To subscribe: 
   http://www.dfwcfug.org/form_MemberRegistration.cfm



----------------------------------------------------------
To post, send email to [email protected]
To unsubscribe: 
   http://www.dfwcfug.org/form_MemberUnsubscribe.cfm
To subscribe: 
   http://www.dfwcfug.org/form_MemberRegistration.cfm


Reply via email to