Re: multiple controllers on 1 page

2006-09-11 Thread Brian French
It would mainly be for the view. in the controller i would call the requestAction and assign the output to a view variable using set(): $this->set('someBlock',$this->requestAction('Controllers/_Method',array('foo'=>'bar'))); // i think this is right. correct me if im wrong or (refering to the

Re: multiple controllers on 1 page

2006-09-10 Thread [EMAIL PROTECTED]
bwaters wrote: > It seems that the consensus is to put the blocks into elements and if > they have data use a requestAction inside the element that returns a > data array containing whatever information you need. There are lots of > other ways to skin this cat, depending on your situation and ho

Re: multiple controllers on 1 page

2006-09-08 Thread bwaters
It seems that the consensus is to put the blocks into elements and if they have data use a requestAction inside the element that returns a data array containing whatever information you need. There are lots of other ways to skin this cat, depending on your situation and how many blocks you are ta

Re: multiple controllers on 1 page

2006-09-08 Thread AD7six
Rather than quote myself, Google is everybody's friend: http://groups.google.com/group/cake-php/browse_thread/thread/63689f6171aa5cf3/27b15a01b48a2acb?lnk=gst&q=AD7six&rnum=1 RequestAction is simulating a url - so I wouldn't expect it to work with _ methods. If you wanted to protect a method such

Re: multiple controllers on 1 page

2006-09-08 Thread Bert Van den Brande
RequestAction returns the rendered view template if I'm correct ... I'm not sure but I think that a direct call to a controller method doesn't auto-render the template ? On 9/8/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > This kind of falls along the other conversation I was trying to ha

Re: multiple controllers on 1 page

2006-09-08 Thread [EMAIL PROTECTED]
This kind of falls along the other conversation I was trying to have. Couldn't you then make a call to a underscored method? So, you couldn't call /controller/_method, but you could do $this->controller->_method()?? I would like to know whether the direct call or a requestAction is the "correct"

Re: multiple controllers on 1 page

2006-09-07 Thread Mikee Freedom
in some instances I employ the uses attribute of a controller to access other models so i don't have to use the requestAction method. for example, on my dashboard of the admin area I list a few totals: e.g. total users: 100 total users in last month: 35 total images on system: 32 total space on

Re: multiple controllers on 1 page

2006-09-07 Thread Olivier Percebois-Garve
Well, U can also make use of requestAction in the layout, in components and I guess in elements too. In my abroad experiences, sometimes, I found myself very happy when I could hide my French origin... Brian French wrote: Thanks for your help! In response to my own first question, i am

Re: multiple controllers on 1 page

2006-09-07 Thread Brian French
Thanks for your help! In response to my own first question, i am assuming that i am correct as i would have to call the requestAction for each block for each page unless they occure everywhere in which case i could use beforeRender() Yes I'm American and no, it's not hard to live with :-p The

Re: multiple controllers on 1 page

2006-09-07 Thread Olivier Percebois-Garve
Hi I think requestAction is made for that. To avoid a method to be accessed, just use "_" as prefix e.g : function _blabla(){ //blabla } Are u american ? Isn't your lastname difficult to live with there? Brian French wrote: > Im still in the process of wrapping my head around the MVC. I un

multiple controllers on 1 page

2006-09-07 Thread Brian French
Im still in the process of wrapping my head around the MVC. I understand the roles of each of the elements. What i am coming across that i cant seem to figure out is how to have multiple elements work on 1 page. Example: Myspace (i know, but good example of what im talking about). On the homep