Best way to add custom controller?

Discussion in 'aMember Pro v.4' started by csmillions, Apr 3, 2012.

  1. csmillions

    csmillions New Member

    Joined:
    Nov 30, 2011
    Messages:
    1
    Anyone know the safest way to do this?
  2. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    Create custom module. Take any existing module as example. (for example aff) :
    1. Create folder /amember/application/modulename
    2. Create module.xml (contains module description) and db.xml if you require database modifications.
    3. Create bootstrap.php that will contain Am_Module child:
    class Bootstrap_Modulename extends Am_Module
    and create handlers for hooks.
    4. Then create:
    /controllers/ - folder where you will store your custom controllers.
    /library/ - folder where you can include your custom classes.
    /views/ - folder where your custom views will be stored.
    winmacsecurity and rdorfman like this.

Share This Page