Thanks. That helps. I was thinking along those lines and I've got
something closer to what I want.

With this code, however, the helper file still needs to be in the
generic helpers folder. What I'd ideally like is a way to read the
helpers from the current theme and include them... something like:

                        $HLFolder =& new Folder();
                        
$HLFolder->cd(APP.'plugins'.DS.'cms'.DS.'views'.DS.'themed'.DS.
$this->theme.DS.'helpers');
                        $HelpersList = $HLFolder->read();
                        foreach($HelpersList[1] as $Helper) {
                                $this->helpers[ucfirst(substr($Helper, 0, -4))] 
= array('search'
=> array(APP.'plugins'.DS.'cms'.DS.'views'.DS.'themed'.DS.$this-
>theme.DS.'helpers'), 'file' => $Helper);
                        }

But I've figured out that the $options variable on in the
&_loadHelpers function in the View class doesn't work in this way.
Is there a way of specifying a particular directory to load the helper
from?

I also tried in my foreach loop:
App::import('Helpers', $Helper, true,
array(APP.'plugins'.DS.'cms'.DS.'views'.DS.'themed'.DS.$this-
>theme.DS.'helpers'), $Helper);

But I think this doesn't work because it's loading this helper before
it's got around to loading the helpers in general.

Any more tips?

On Oct 7, 11:27 pm, "jitka (poLK)" <[EMAIL PROTECTED]> wrote:
> App::import('View', 'Theme');
> class AdvancedThemeView extends ThemeView {
>     function __construct(&$controller) {
>         parent::__construct($controller);
>         switch ($this->theme) {
>             ...
>             $this->helpers[] = ...
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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