Difference between revisions of "How to add own link to "Useful Links" block in member's area"

From aMember Pro Documentation
Jump to: navigation, search
(Created page with "Create /amember/application/configs/site.php with this code: <source> <?php Am_Di::getInstance()->hook->add(Am_Event::GET_MEMBER_LINKS, 'getLinks'); function getLinks(Am_Event...")
 
Line 5: Line 5:
 
Am_Di::getInstance()->hook->add(Am_Event::GET_MEMBER_LINKS, 'getLinks');
 
Am_Di::getInstance()->hook->add(Am_Event::GET_MEMBER_LINKS, 'getLinks');
 
function getLinks(Am_Event $event){
 
function getLinks(Am_Event $event){
     $event->setReturn(array('/URL/' => 'LINK TITLE'));
+
     $event->addReturn('LINK TITLE', '/url/');
 
}
 
}
  
 
</source>
 
</source>

Revision as of 02:09, 28 August 2012

Create /amember/application/configs/site.php with this code:


<?php 
Am_Di::getInstance()->hook->add(Am_Event::GET_MEMBER_LINKS, 'getLinks');
function getLinks(Am_Event $event){
    $event->addReturn('LINK TITLE', '/url/');
}