I created a page from the BxDolPageView template called chart.php. At the bottom, I have added this:
// Submenu actions
$iId = $client;
$iMemberId = $memberID;
$sTxtProfileAccountPage = _t('_sys_am_profile_account_page');
$sTxtProfileMessage = _t('_sys_am_profile_message');
$sTxtClientAdd = _t('_sys_am_profile_client_add');
$sTxtClientAccept = _t('_sys_am_profile_client_accept');
$sTxtClientCancel = _t('_sys_am_profile_client_cancel');
$aVars = array(
'ID' => $iId,
'member_id' => $iMemberId,
'BaseUri' => BX_DOL_URL_ROOT,
'cpt_am_profile_account_page' => $sTxtProfileAccountPage
);
if(isClientRequest($iMemberId, $iId)) {
$aVars['cpt_am_client_add'] = '';
$aVars['cpt_am_profile_message'] = $sTxtProfileMessage;
} else if(isClientRequest($iId, $iMemberId)) {
$aVars['cpt_am_client_add'] = '';
$aVars['cpt_am_client_accept'] = $sTxtClientAccept;
$aVars['cpt_am_profile_message'] = '';
} else {
$aVars['cpt_am_client_add'] = $sTxtClientAdd;
$aVars['cpt_am_client_cancel'] = $sTxtClientCancel;
$aVars['cpt_am_profile_message'] = $sTxtProfileMessage;
}
$GLOBALS['oTopMenu']->setCustomSubActions($aVars, 'ChartTitle', true);
I took that section from the profiles.php page and changed the references from friends to clients. I want it to function exactly the same as the profile page does. If the member is not a client, button displays to add as client and so on.
Next, I went into the sys_objects_actions table, and duplicated all of the entries that were related to friends, and added entries for clients. Also made sure that the new client entries had ChartTitle as type to match my code. But I am still not getting a submenu to show up. I know it is probably something simple, but can someone please help.
Thanks in advance.