This has come up a lot lately for some reason. I guess because there
are not enough examples.

Personally, I would setup and element. Lets calll it /app/views/
elements/menu.thtml
add to this:

$controls = $this->requestAction('controls/index');
foreach($controls as $control) {
//do whatever
}
very simply this asks the controls controller to return the index
method so you can display the data however you want

<?php
class ContolsController extends AppController {

function index() {

    $contols = $this->Control->findAll();

    //here is where the requesAction is handled so only the data is
returned
    if(isset($this->params['requested'])) {
        return $controls;
    }

    $this->set('controls', $controls);
}

}
?>


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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