by the way:
http://www.dereuromark.de/2010/06/26/helper-component-lib/
if you need help on where use what when.


On 20 Jun., 15:02, euromark <dereurom...@googlemail.com> wrote:
> jesus christ
> that looks awefully wild...^^
>
> if you need sth to work both in controllers and helpers make a lib!
> otherwise use a component in your controller
>
> and if you really need to use a helper in a controller (should not be
> the case)
> app::import() it
>
> On 20 Jun., 14:56, Tilen Majerle <tilen.maje...@gmail.com> wrote:
>
>
>
>
>
>
>
> > no mate, helpers can be used ONLY in views and components in controllers :)
>
> > --
> > Lep pozdrav, Tilen Majerlehttp://majerle.eu
>
> > 2011/6/19 jesperkp <jesperkpeder...@gmail.com>
>
> > > I can use the core helpers from CakePHP - but I can not get my own
> > > helper to function.
>
> > > To test my helper installation I do this :
>
> > > <?php
> > > /* /app/views/helpers/threadlist.php */
> > > class ThreadlistHelper extends AppHelper {
> > >        function check()
> > >        {
> > >                return 1;
> > >        }
> > > }
>
> > > In my controller file I have this :
>
> > >        public $helpers = array('Threadlist');
>
> > >        function checkGetListHelper() {
> > >                echo $this->Threadlist->check();
> > >        }
>
> > > In my view I do :
>
> > >        echo "Checking for checkGetListHelper(): ". $this-
> > > >requestAction('threads/checkGetListHelper');
>
> > > Which result in...
> > > Notice (8): Undefined property: ThreadsController::$Threadlist [APP/
> > > controllers/threads_controller.php, line 68]
>
> > > Fatal error: Call to a member function check() on a non-object in /
> > > www_root/my_server_removed/app/controllers/threads_controller.php on
> > > line 68
>
> > > Any idea of what I am doing wrong?
>
> > > --
> > > Our newest site for the community: CakePHP Video Tutorials
> > >http://tv.cakephp.org
> > > Check out the new CakePHP Questions sitehttp://ask.cakephp.organdhelp
> > > others with their CakePHP related questions.
>
> > > To unsubscribe from this group, send email to
> > > cake-php+unsubscr...@googlegroups.com For more options, visit this group
> > > athttp://groups.google.com/group/cake-php

-- 
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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to