hi
I seem to have a weird problem with app_controller.
Website that I'm building has got a navigation system based on menu, that
get's it values from a database.
menu is built as an element, that uses Tree.php helper, modified by me.
below you can find my app_controller.php file:
class AppController extends Controller {
var $helpers = array('Html', 'Tree');
var $uses = array('Menu');
function beforeRender(){
# setting the menu right #
$conditions['live']="1";
$order='position ASC';
$this->set('menu_t',
$this->Menu->findAllThreaded($conditions,null,$order));
$this->set('menu', $this->Menu->findAll($conditions,null,$order));
##########################
}
}
as far as it shows the menu in a correct manner on http://www.mywebsite.com/
it comes up with this error when I try to access an item from menu here:
http://www.mywebsite.com/pages/menu_item/
*Fatal error*: Call to a member function on a non-object in *
/homepages/24/d111656091/htdocs/CMS2/app/app_controller.php* on line *49
*line that it is refering to is : $this->set('menu_t',
$this->Menu->findAllThreaded($conditions,null,$order));
I don't understand what is wrong with it - I tried to change my settings in
routes, but they don't seem to work, would be much gratefull if anyone would
be able to help
Thanks!
Kasia
*
*
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---