How to translate the tags for CFScript

I want to use CFScript 'pure' in my code. There are a lot of problems.

Tags: < cfinclude to cfscript include

Tags:

< cfswitch expression = "#REQUEST. Attributes.Go [1] #">"

< cfcase value = "error" >
< cfinclude template="./content/error/_index.cfm"/ >
< / cfcase >

< cfcase value = "Pick-up" >
< cfinclude template="./content/pickup/_index.cfm"/ >
< / cfcase >

< cfcase value = "Send" >
< cfinclude template="./content/send/_index.cfm"/ >
< / cfcase >

<!-by default at home. ->
< cfdefaultcase >
< cfinclude template="./content/home/_index.cfm"/ >
< / cfdefaultcase >

< / cfswitch >

It works well

cfscripts:

< name cffunction 'include' = >
< cfargument name = "template" >
< cfinclude template = "template # #" >
< / cffunction >

< cfscript >
switch (' #REQUEST.) ("Attributes.Go [1] # ')
{
("case"error": include("./content/error/_index.cfm ");
("case"Pick-up": include("./content/pickup/_index.cfm ");
("case"send": include("./content/send/_index.cfm ");
("default: include("./content/home/_index.cfm ");
}

not work well.

PS: above code (tags) from project eCards Nadel.

can someone help me? Thank you!

You need to read the docs:

Using switch and case statements

http://help.Adobe.com/en_US/ColdFusion/9.0/developing/WSc3ff6d0ea77859461172e0811cbec0a0e0-7fdf.html #WSB69283B9-CA98-4fdf - 95B 2-80665F57BC82

Note that the BOX blocks must end with a BREAK.

In addition, when you ask a question, say something 'wrong' is not much help: you must say how something does not work, for example: it causes an error, or if you see something you didn't expect, etc.  Otherwise, it's a little ambiguous.

--

Adam

Tags: ColdFusion

Similar Questions

Maybe you are looking for