Creating a Menu Tab in VTiger
VTiger, Web Development, PHP January 2nd, 2008
I have searched several forums posts at the VTiger community just to find out how to add a menu tab entry on VTiger CRM.
It’s kind of insane the way things were posted and you just could not find a entry that actually showed all the steps to create a new menu tab.
For a start the version that I’m using is 5.02 and this is what you will need to do to create a new menu tab.
1st. Add a entry on the file tabdata.php for the new menu:
$tab_info_array=array(’Dashboard’=>1,’Potentials’=>2,’Home’=>3,’Contacts’=>4,’Accounts’=>6,
‘Leads’=>7,’Notes’=>8,’Calendar’=>9,’Emails’=>10,’HelpDesk’=>13,’Products’=>14,
‘Faq’=>15,’Events’=>16,’Vendors’=>18,’PriceBooks’=>19,’Quotes’=>20,’PurchaseOrder’=>21,
‘SalesOrder’=>22,’Invoice’=>23,’Rss’=>24,’Reports’=>25,’Campaigns’=>26,
‘Portal’=>27,’Webmails’=>28,’Users’=>29,’NewMenu‘=>30);
$tab_seq_array=array(’1′=>0,’2′=>0,’3′=>0,’4′=>0,’6′=>0,’7′=>0,’8′=>0,’9′=>0,
‘10′=>0,’13′=>0,’14′=>0,’15′=>0,’16′=>2,’18′=>0,’19′=>0,’20′=>0,’21′=>0,’22′=>0,
‘23′=>0,’24′=>0,’25′=>0,’26′=>0,’27′=>0,’28′=>0,’29′=>0,’30‘=>0);
2nd. Add a menu sequence tab on the parent_tabdata.php:
$parent_tab_info_array=array(1=>’My Home Page’,/*2=>’Marketing’,*/3=>’Sales’,/*4=>’Support’,*/5=>’Analytics’,6=>’Inventory’,
/*7=>’Tools’,*/8=>’Settings’,9=>’NewMenu‘);
$parent_child_tab_rel_array=array(1=>array(3,9,10,),/*2=>array(26,6,4,10,7,9,8,),
*/3=>array(6,7,4,2,20,22,23,14,19,8,9,),/*4=>array(13,15,6,4,14,8,10,9,),
*/5=>array(1,25,),6=>array(14,18,19,21,22,20,23,),/*7=>array(24,27,8,),
*/8=>array(),9=>array(30,));
*** Note: If you want to remove a tab entry, just comment it out (easier way, but will remove for all profiles).
2nd and 1/2. If you are creating a new module, edit the file en_us_lang.php inside includes/languages and add on the moduleList array a entry for your menu.
3rd. Add entries on the following tables for the new menu.
vtiger_tab
vtiger_parenttab <- This sequence must follow the sequence on the parent_tab_info_array
vtiger_parenttabrel <- You must enter a parent tab pointing to the menu entry here (9=>30)
vtiger_profile2tab
vtiger_profile2standardpermissions
After this the menu entry will be show as a new tab on the main menu.
Posts
April 20th, 2009 at 3:28 pm
Hola,
I’m training to add one tab to user view, where add more attributes for each user.
By default there are two tabs, contact info and more info.
I need one more tab like games.
Could you help me to do it ?
Thank you very much.
April 21st, 2009 at 9:41 am
Hi,
The method above is to set a new menu entry tab and I really don’t know how to create it inside a menu.
Anyway, when I was messing with this, I have opened the files that could be associated with that and did try to apply small changes on them to see if affected. You can try this for your needs (usually is not as complex as it seems).
Anyway, you can always check on VTiger Forums. There is always a VTiger developer there checking the posts and they always answer and helps.
Have fun and good luck.