Quantcast
Channel: Add optional abort Attribute to cfinclude
Viewing all articles
Browse latest Browse all 40

Add optional abort Attribute to cfinclude

$
0
0

@21Solutions wrote:

While I'd argue that its appropriate in cfdump as its a tool for debugging, I'm not convinced its appropriate in cfinclude

many times you want to pass the code to another template and not continue with execution of the current one, e.g. when you validate parameters:

<cfcode goes here>
<cfif (!isValid)>
  <cfinclude template="/invalid_parameters.cfml" abort="true>
</cfif>

<cfcode of template continues here>

Hmm.. interesting. Never knew you could do <cfdump abort="true"> (since CF9 to boot).

yes, they added it after they saw it in Railo

Read full topic


Viewing all articles
Browse latest Browse all 40

Trending Articles