Andrew,
I'm not sure if what I do is "Best Practice" - but, here it is:
There are a lot of ways to do this. I guess it would depend on your
method of passing vars.
Cookies or RC.
1.) Under "views" I would make a folder called "Users".
- All my views will go here.
2.) Then I create one "handler" called "Users.cfc"
- Inside the handler I would put the following ...
<!--- index func --->
<cffunction name="index" output="false" hint="index">
<cfargument name="event">
<cfset var rc = event.getCollection()>
<!--- Here we can either use cookies that have been set
or getVar functions --->
<cfif rc.Edit eq true >
<cfset event.setView("Users/Edit")>
</cfif>
<cfif rc.Edit eq true >
<cfset event.setView("Users/Edit")>
</cfif>
<cfset event.setView("Users/index")>
</cffunction>
<!--- View func --->
<cffunction name="View" output="false" hint="View">
<cfargument name="event">
<cfset var rc = event.getCollection()>
<cfset event.setView("Users/View")>
</cffunction>
<!--- Edit func --->
<cffunction name="Edit" output="false" hint="Edit">
<cfargument name="event">
<cfset var rc = event.getCollection()>
<cfset event.setView("Users/Edit")>
</cffunction>
So instead of having 1 "handler" and its subsequent view folder for
"Edit", "View", etc.
I use 1 handler to control all the related views.
This is easily done in ColdfuionBuilder with ColldBox Utilities. When
you make a handler - replace the word "index" witth
"index,View,Edit" (with no spaces). Make sure that you set the "View
Folder" field proplerly (views/Users).
In this case, I would have 1 handler control giving access to multiple
pages like "Edit" and "View".