0

I would like to add codeigniter helper to template.

For example:

{{ helper:redirect uri="/order/images/" method="refresh" }}

but it doesn't work. It is possible to call standart helper this way?

Anthony
  • 3,218
  • 3
  • 43
  • 73

1 Answers1

0

I don't know is it right way but it works:

class Plugin_AvHelper extends Plugin_Helper
{
    public function redirect()
    {
            $uri        = $this->attribute('uri');
        $method     = $this->attribute('method');

        return $uri && $method ? redirect($uri, $method) : NULL;
    }
}

and to call:

{{ avhelper:redirect uri="/order/images/" method="refresh" }}
Anthony
  • 3,218
  • 3
  • 43
  • 73