Re: Can a plugin component auto-load a helper

2011-12-09 Thread euromark
you should always mention the current cakephp version I am assuming however that you use 1.3 (due to App::import) yes, you can. quite easily as a matter of fact. inside your component, all you have to do: $this-controller-helpers[] = 'MyPluginName.MyHelperName'; or $controller-helpers[] =

Re: Can a plugin component auto-load a helper

2011-12-09 Thread Toby G
Thanks for the reply, yes, sorry, it is v1.3. This is what I'd done... $this-controller-helpers['Facebook.Facebook'] = array( #'config' = $this-config, ); ... but I am getting an error in my layout where I include... $this-Facebook-init(); The error is Undefined property:

Re: Can a plugin component auto-load a helper

2011-12-09 Thread gremlin
Yeah, pay attention to what was shown above your reply - you are setting the facebook helper's name to be the key of the array but the code above your reply is very clearly not setting the key to the helpers name but using a normal numeric index. On Dec 9, 2:52 am, Toby G

Can a plugin component auto-load a helper

2011-12-08 Thread Toby G
Hi there, I've been attempting to get a plugin component auto-load the plugin's helper file. I have added it to the controller's helper array, but it's not loading the helper into view (under $this-Helper), so I think that the helpers have already been loaded prior to me adding the plugin helper