Or "unload" in the actions you need:

function pdfreport() {
    if (in_array("TidyHelper"), $this->helpers) {
        unset($this->helpers[array_search("TidyHelper", $this-
>helpers)]);
    }
    ...
}

Makes sense if there are a lot of actions and only couple of them do
not need this helper. In such case you can also load this helper in
beforeFilter based on action name:

function beforeFilter() {
    parent::beforeFilter();
    if ($this->action != "pdfreport") {
        $this->helpers[] = "TidyHelper";
    }
}

On Jul 14, 2:14 am, rod <rodrigo.z...@gmail.com> wrote:
> You could just load TidyHelper in the actions you need:
>
> function add() {
> $this->helpers[] = "TidyHelper";
> ..
>
> }
>
> On Jul 13, 12:59 pm, Ernesto <e.fanz...@gmail.com> wrote:
>
>
>
> > Hello.
>
> > i have a controller with some actions:
>
> > - index
> > - add
> > - delete
> > - pdfreport
>
> > i want to disable the "TidyHelper" in pdfreport action 'cause it will
> > break my pdf.
>
> > is there any way to do that?
--~--~---------~--~----~------------~-------~--~----~
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 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to