aMember v4... how to customize member menu?

Discussion in 'aMember Pro v.4' started by glacius, Feb 9, 2012.

  1. glacius

    glacius New Member

    Joined:
    Jan 11, 2012
    Messages:
    24
    Right now the menu has:
    "Main Page", "Add/Renew Subscription", "Payments History", "Edit Profile"

    I would like to remove the button for "Payments History"

    Does anyone know where I can do this in aMember v4 ?

    Thanks
  2. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,274
    Add this code to /amember/application/configs/site.php:
    PHP:
        Am_Di::getInstance()->hook->add(Am_Event::USER_MENU,  create_function('$event'"
             \$event->getMenu()->removePage(\$event->getMenu()->findOneBy('id', 'payment-history'));"
    ));
  3. glacius

    glacius New Member

    Joined:
    Jan 11, 2012
    Messages:
    24
    /amember/application/configs/site.php did not exist, so I created it and added the line you provided within <?php ?> tags.

    It worked perfectly.

    Thanks!
  4. mrhoneyfoot

    mrhoneyfoot New Member

    Joined:
    Feb 2, 2012
    Messages:
    5
    Hi, I have a similar question:

    How can I add items to the menu in aMember v4?

    For example, a protected page.

    Thanks.
  5. glacius

    glacius New Member

    Joined:
    Jan 11, 2012
    Messages:
    24
    I found the above quote in this thread:
    http://www.amember.com/forum/threads/how-to-customise-amember-user-tab-menu.14129/
  6. mrhoneyfoot

    mrhoneyfoot New Member

    Joined:
    Feb 2, 2012
    Messages:
    5
    Thanks Glacius!

    That worked, with one small problem. The CSS that makes the currently selected tab red is not working for the new tab. It works for all others, but not the new one.

    Since this thread is about customising the menu, does anyone know how to fix this?

    Thanks.
  7. juanfra

    juanfra New Member

    Joined:
    Sep 29, 2011
    Messages:
    22
    I've seen both threads and I want to customize the button label.

    Where can I check the existing methods for that class?

    I need something like
    $menu
    ->
    findOneBy
    (
    'id'
    ,
    'new-add-renew'
    )->
    setLabel
    (
    'Whatever I need'
    );


    Cheers
  8. juanfra

    juanfra New Member

    Joined:
    Sep 29, 2011
    Messages:
    22
    Well, I've been looking and epic logic is epic.

    To set a label for any item:
    PHP:
    $menu->findOneBy('id''the-id-i-need')->setLabel('The label I want');
    Amember guys: You should create a collaborative wiki.

    Cheers.
  9. alex

    alex Administrator Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,020
    Thank you for suggestion and for publishing the solution. We are going to make this part of program customizable by GUI in next version.
  10. raoulmilhado

    raoulmilhado New Member

    Joined:
    May 6, 2013
    Messages:
    1
    how to add menu link in user member menu?
  11. miso

    miso aMember Pro Customer

    Joined:
    Aug 22, 2006
    Messages:
    542
  12. fergus

    fergus New Member

    Joined:
    Dec 5, 2008
    Messages:
    25
    hi, 3 years after the above post and there is no configuration GUI yet to edit the members menu, mmmmm
  13. caesar

    caesar aMember Pro Developer Staff Member

    Joined:
    Oct 16, 2009
    Messages:
    1,686
    @fergus the issue is this menu is very dynamic and different modules/plugins/customization add/remove items automatically based on user criteria (user active subscriptions/user fields). It do this task a bit difficult.
    In most cases all necessary changes can be done with site.php and usually you do it only once during setup. So this task has not high priority.

    Do you need to do some exact changes? Please let me know and I will give you solution.

Share This Page