RE: [coldbox:16983] [coldbox 3.5.3] multiple renderView()

Understood. I would recommend using an interceptor to set these permission-based layout views. That way, you don’t have to muck up every handler action with the logic and it’s guaranteed to run on every page.

Register an interceptor with a preProcess method that checks the credentials of the logged-in user and sets the views they should get to see in the private request collection. (It’s cleaner that way and keeps it clear of the regular request collection that actually applies to the page). Now, every page on your site will automatically have the views set for them. Or really, for that matter, you could simply put the if statement in your layout and be done with it. There’s no reason why you can’t put a little logic in a layout as long as any heavy lifting is deferred to a service.

Is the difference between rendering a view and running an event that renders a view clearer now? For instance, if the left side bar was “similar content” or something like that, your view would need to get data to display and the wrapper event gives you a place to do that cleanly.

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

As to “Register an interceptor with a preProcess method that…” I’ll have to read up on that and I will. Being we’re brand new with Coldbox and most of us are brand new to MVC (frameworks or otherwise) I’m trying to get some things in my head to provide a more or less “standard” way for us to work with our apps within ColdBox. We considered ColdBox lite for a bit but that seems to just be Coldbox without addons and still leaves the same design questions so set that aside for now. Thanks for answering in detail as you have. I’m just now working thru the examples that came with Coldbox. I’m pretty sure the fog will lift at least a little bit pretty soon. Thanks again! - irv