Hi Sytze,

sure, you're calling a helper in a controller...

here's something not very cakish (not MVC) but it works:
  App::import('Helper', 'Site');
  $mysite = new SiteHelper();

  $mysite->myfonction...

bye,


On Apr 23, 10:42 am, Sytze Loor <[email protected]> wrote:
> Hi,
> Although I found a workaround for this problem, I'm not really happy
> about it.
> In my AppController is have this:
> [code]
> class AppController extends Controller {
>   var $helpers = array('javascript', 'form', 'html', 'number', 'time',
> 'site');
>   function beforeFilter() {
>     Configure::load('site_config/config');
>   }}
>
> [/code]
>
> The SiteHelper (last in the helpers array), I've build myself.
>
> However, when I try this, the SiteHelper (or any custom build helper)
> is not being loaded.
>
> I also have a beforeFilter as you can see. When I place echo('test')
> in it, the SiteHelper is being loaded and everything works out as it's
> supposed to.
>
> My questions are simple; am I doing something wrong and is there a way
> to fix this properly?
>
> Here is my full code:
> [code]
> class AppController extends Controller {
>   var $helpers = array('javascript', 'form', 'html', 'number', 'time',
> 'site');
>   function beforeFilter() {
>     Configure::load('site_config/config');
>   }}
>
> [/code]
>
> Thank you in advance!
>
> Sytze Loor
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to