iamkillyou
Programmer
I have a custom tag that draws a window frame around content, and a tag-calling-tag that calls it, both tags use cfswitch to test if we're in a start tag or an end tag. I'm having problems grasping how to stick an end tag in my tag calling tag.
<!--- CallWidget.cfm
--->
<!--- Params etc omitted --->
<CFSWITCH expression=#ThisTag.ExecutionMode#>
<CFCASE value='start'>
<CF_WIDGET AttributeCollection=<CFOUTPUT>"#WindowParams#"</CFOUTPUT>>
</CFCASE>
<CFCASE value='end'>
<!--- Ending the custom tag here is causing a cf error but it's the only way(that I know of) to encapsulate the data around the caller to CallTag.cfm --->
</CF_WIDGET>
</CFCASE>
</CFSWITCH>
This is the test document that calls the tag calling tag.
<!--- Test.cfm
--->
<CF_CALLWIDGET TITLE ="Title"
HEIGHT ="100"
PIXELWIDTH ="400"
HEADER ="Header">
Test text goes here
</CF_CALLWIDGET>
<!--- CallWidget.cfm
--->
<!--- Params etc omitted --->
<CFSWITCH expression=#ThisTag.ExecutionMode#>
<CFCASE value='start'>
<CF_WIDGET AttributeCollection=<CFOUTPUT>"#WindowParams#"</CFOUTPUT>>
</CFCASE>
<CFCASE value='end'>
<!--- Ending the custom tag here is causing a cf error but it's the only way(that I know of) to encapsulate the data around the caller to CallTag.cfm --->
</CF_WIDGET>
</CFCASE>
</CFSWITCH>
This is the test document that calls the tag calling tag.
<!--- Test.cfm
--->
<CF_CALLWIDGET TITLE ="Title"
HEIGHT ="100"
PIXELWIDTH ="400"
HEADER ="Header">
Test text goes here
</CF_CALLWIDGET>