Akelos Framework v1 forum archive. This forum is no longer maintained. To report bugs please visit https://github.com/akelos/akelos/issues
    • CommentAuthorkatun
     
    i need a global helper for using in several templates like this:

    <?php echo $my_global_helper->link_to_my_own_function('bla'); ?>

    Is there a easy way to implement this? or is there already a global helper?
    greets
    •  
      CommentAuthorbermi
     

    You can set which app helpers to use in your controller by declaring it on your app/application_controller.php

    class ApplicationController extends AkActionController {
        var $app_helpers = 'my_global';
    }
    

    You could also implement you helper as a plugin approach. To see an example try

    ./script/plugin install calendar_helper
    

    the plugin is at app/vendors/plugins/acts_a_calendar/. Important bits are the init.php and the helper itself in the lib folder.