Re: Providing arguments to element from view

2006-08-04 Thread Samuel DeVore
According to the api http://api.cakephp.org/class_view.html#54f7a2fbe1215f970dff3132730ab1f1renderElement takes two parameters you could try this$params['user_id'] = $user_id;echo $this-renderElement('user_box', $params);and in the element look for it(hint it will be $user_id ;)Sma D On 8/4/06,

Re: Providing arguments to element from view

2006-08-04 Thread half_brick
Cheers, I actually got that working just after I posted. What would be even more useful, and what I probably should have asked to start with is how do you provide parameters from the view through to the component? At the moment I have access to the parameters at the view, but I'd rather pass the

Re: Providing arguments to element from view

2006-08-04 Thread Samuel DeVore
In cake speak a component is a class used to contain common code for many controllers, I'm not sure this is what you are talking abouthttp://manual.cakephp.org/chapter/9 - components Is is possible you are thinking of a need for $this-requestAction ('/controller/action/',$params)referenced in the

Re: Providing arguments to element from view

2006-08-04 Thread half_brick
Ok got it going, seems you can call request action from a view just fine. Thanks very much for your help Samuel. Cheers, Toby --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group,