i found the answer by myself:
in View/Elements/header.ctp i added this line:
$menu1Helper = $this->Helpers->load('Menu1');
now it works
Am Montag, 25. Juni 2012 11:50:44 UTC+2 schrieb m22s22:
>
> hi
>
> i get Undefined property: View::$Menu1 ONLY on my production server.
> on localhost no error message.
> i use the same cakephp version 2.1.3 on both.
> php 5.3.10 on localhost and php 5.3.2 on production server.
>
> default.ctp:
> <?php echo $this->element('header'); ?>
>
> in View/Elements/header.ctp:
> <div class="<?php echo $this->Menu1->myhighlight('/pages/home$'); ?>">
>
> in View/Helper/Menu1Helper.php:
>
> App::uses('AppHelper', 'View/Helper');
> class Menu1Helper extends AppHelper {
> public $helpers = array('Html');
> public function myhighlight($path, $normal = 'navLink', $selected =
> 'current_page_item') {
> .....
> return $class;
> }
> }
>
> in AppController.php:
> public $helpers = array('Form', 'Html', 'Session', 'Menu1');
>
> any help very welcome, i'm stuck.
> regards
>
--
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