That is really complicated and probably unnecessary code. You shouldn't be 
importing models into a view - a view is just there to render the output of a 
controller function. Why can't you gather this data in your controller and just 
pass it as a variable?

Where is your getGroupsList function?

Have you read the guide - at all?

Jeremy Burns
Class Outfit

[email protected]
http://www.classoutfit.com

On 17 Feb 2011, at 05:52, [email protected] wrote:

> It work. I check directly url to function and returned data. I want
> display resault by helper
> 
> function getGroupsList(){
> 
>        App::import('Controller', 'groups');
> 
>        $group = new GroupsController();
> 
>       return $group->groupList();
> 
>    }
> In view:
> <? echo $show->getUsersList();?>
> 
> App::import('Model', "Users");
> 
> $user = new Users();
> 
> $this->set('users', $user->find('all') );
> 
> -- 
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org 
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
> 
> 
> To unsubscribe from this group, send email to
> [email protected] For more options, visit this group at 
> http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to