hi,

This is my controller :-

<?PHP
class MenusController extends AppController
 {
  var  $uses=array('Category');


function index()
 {
         $maincatmenu=$this->set($this->Category->findAll());
}
?>

Below is my model ("menu.php") :-

<?PHP
class Menu extends AppModel
 {

   }

?>


 below is my view file ("index.thtml") :-

<?PHP
 for($j=0;$j<sizeof($maincatmenu);$j++)
                                  {
                                        <tr><Td>echo 
$maincatmenu['Category']['name']</Td></tr>
                                         }


?>

i am using an element that is renders in the default.thtml and below i
am trying to have menus data in that element like this :-

$this->requestAction('/menus/index');


but not able to get this. But when i try to access directly menus than
it works (http://mysite.com/menus/) in other it does not (http://
mysite.com/categories)

Pls help.

On Aug 15, 12:07 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> Thanks Chris,
>
> I will review my code and will let u know if i got something to ask.
>
> Thanks again !!!
>
> On Aug 14, 11:53 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
>
> > On 8/14/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> > > Thanks Chris,
> > > can we use requestAction()  in the default.thtml ? and how ?
>
> > > if we use something like this view->controller->requestAction()  as i
> > > found this in one of the article in the bakery.
>
> > > then what  "Controller" means here.
>
> >http://groups.google.com/group/cake-php/browse_thread/thread/3563ab54...
>
> > --
> > Chris Hartjes
> > Senior Developer
> > Cake Development Corporation
>
> > My motto for 2007:  "Just build it, damnit!"
>
> > @TheBallpark -http://www.littlehart.net/attheballpark
> > @TheKeyboard -http://www.littlehart.net/atthekeyboard


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to