Re: Switch Element On/Off

2007-03-01 Thread GreyCells
Determine the business logic in the controller and use controller-set to communicate the decisions to the views/elements. Don't get too hung up on strict seperation of M-V-C there's plenty of grey across the boundaries... A pragmatic approach if generally more productive :) Interesting

Switch Element On/Off

2007-02-28 Thread phirschybar
Hey all.. What if I have an element and I want to switch it on for some pages and off for others? I could easily pass it some data and do the logic to determine if it should be shown right within the element itself or even in the default layout but then I would have business logic right in the

Re: Switch Element On/Off

2007-02-28 Thread scragz
Make multiple layouts and switch between them in the controller, $this- layout = 'no_thingy'; On Feb 28, 11:44 am, phirschybar [EMAIL PROTECTED] wrote: Hey all.. What if I have an element and I want to switch it on for some pages and off for others? I could easily pass it some data and do

Re: Switch Element On/Off

2007-02-28 Thread phirschybar
scragz: that sounds silly unless there is a slick way of doing 'includes' with parts of layouts. In your case I would be repeating a lot of layout code. GreyCells: thats exactly what I ended up doing. In my controller, I set a boolean and then just did a simple check for it in the view before

Re: Switch Element On/Off

2007-02-28 Thread scragz
Includes with parts of layouts are elements. Other way is probably better though. On Feb 28, 1:49 pm, phirschybar [EMAIL PROTECTED] wrote: scragz: that sounds silly unless there is a slick way of doing 'includes' with parts of layouts. In your case I would be repeating a lot of layout code.