Not signed in (Sign In)
Welcome Guest!
Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
    • CommentAuthoriJyrki
    • CommentTimeAug 5th 2007
     

    Hello again!

    Is it possible to call another helper from a helper, e.g. url_helper from application_helper?

    Thanks for your help! -jyrki

    •  
      CommentAuthorbermi
    • CommentTimeAug 5th 2007
     

    You can do this via the $this->_controller reference, but your helper needs to extend AkActionViewHelper

    Here is an example

    class ApplicationHelper extends AkActionViewHelper
    {
        function app_link_to($name, $options)
        {
            return $this->_controller->url_helper->link_to($name, $options);
        }
    }
    
    • CommentAuthoriJyrki
    • CommentTimeAug 5th 2007
     

    Thanks. I had tried the approach previously but failed. Now it works. Propably I just forgot a letter or so...

    -jyrki

Add your comments
    Username Password
  • Format comments as