How to add/remove html blocks in member's area

From aMember Pro Documentation
Revision as of 02:47, 19 February 2016 by Alexander (Talk | contribs)

Jump to: navigation, search

Add this code to site.php file:

//add new block at position member/main/left
Am_Di::getInstance()->blocks->add(new Am_Block('member/main/left', 'My Block Title', 'my-block-id', null, function (Am_View $v) {
    $html = <<<CUT
     <p>You can put some html code here</p>
CUT;
    return $html;
});
 
//remove block with id member-main-unsubscribe (Unsubscribe from all email messages block)
Am_Di::getInstance()->blocks->remove('member-main-unsubscribe');
 
 
// Remove newsletter subscriptions  blog: 
Am_Di::getInstance()->blocks->remove('member-main-newsletter');