Jim McAtee wrote:

> I've got quite a few CF5 templates in which I'd like to generate an error page
> that returns an HTTP 404 status code (using <cfhead>).

If I understand you correctly, you want both a 404 statuscode and 
some HTML on that page. Right?


> <cfsilent>
> <cfquery name="myquery" ...>
> </cfquery>
> <cfif myquery.recordcount eq 0>
>    [ throw error here ]
> </cfif>
> </cfsilent>

> 2. If I <cfinclude> the error page, the <cfsilent> suppresses its HTML output.

I used cfsilent like you did for quite a while, but nowadays I 
clean out everything before the page starts with the reset 
attribute of cfcontent. That might be a solution for you too.

Jochem



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Get the mailserver that powers this list at 
http://www.coolfusion.com

Reply via email to