Well I'm a bit of a noob, but what is:
var $helpers = array('link');
Shouldn't it be:
var $helpers = array('Html');
On May 23, 2006, at 10:35 PM, modfather wrote:
>
> I am attempting to add a Global menu to the layout file (thinking this
> is the appropriate place to put it). I tried the css-menu tutorial
> available in the wiki and it failed. I then again scaled back to test
> the following;
>
> class AppController extends Controller {
>
> var $helpers = array('link');
> }//saved in app/app_controller.php
>
> class LinkHelper extends Helper
> {
> function makeEdit()
> {
> echo "linkhelper";
> }
> }//saved as link.php in helpers directory.
>
> the created this as test.thtml in the elements directory.
>
> line 1----> <?php echo $link->makeEdit() ?>
>
> i then inserted <?php echo $this->renderElement('test'); ?> in my
> views/layoutsdefault.thtml
>
> I have tried a few variations of this but i get a fatal error
> Call to a member function on a non-object in
> /cake/app/views/elements/test.thtml on line 1.
>
> would someone like to point me in right direction as to what i am
> doing
> wrong.
>
> cheers.
>
>
> >
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---