Coldfusion code not working in DW template
- December 20, 2009
- 2 replies
- 481 views
Hi, I have a placed coldfusion code:
<cfif SESSION.Auth.RoleID neq 4>
access denied!!!
<cfabort>
</cfif>
at the very top (outside the html code) of a page created from a dreamweaver template. I did this so that when an unauthorized user clicks on the link to the page that they will not be allowed to view the page but get the message "access denied!!!"
However, the code doesn't seem to be working with the template. When I click the link to the page, the page still displays. It has the words "access denied" at the top of the page but still displays the page which I don't want viewed by the unauthorized user. If I detach the pages from the template, then the code works. Of course, this is not a good solution as I am using a template because of the numerous advantages it delivers when creating a website.
Can anyone tell me why this is happening and what I should do to fix this?
