[Vtigercrm-developers] Adding link to module results in incorrect URL
Alex Hall
ahall at autodist.com
Wed Mar 21 13:58:33 GMT 2018
Hi all,
I'm trying to add a link to our organizations module. I've got it working,
by adding it directly to the PHP file. The problem is that VTiger modifies
the URL of my link, adding "&Module=" to the end. I gather that link URLs
are supposed to be either local to VTiger's path, or JS functions. How can
I get my link's URL to be left alone?
Here's what I did. This is in Modules/Accounts/Models/DetailView.php, just
above the "return $linkModelList;" line:
//AutoDist addition: hard-code a link to Request Tracker in this
links list
$rtLink = array(
'linktype' => 'DETAILVIEWBASIC',
'linklabel' => 'View AutoDist Tickets',
'linkurl' => 'https://tickets.mysite.com', //this URL gets
modified by VT and I don't know how to stop it
'linkicon' => ''
);
$linkModelList['DETAILVIEW'][] =
Vtiger_Link_Model::getInstanceFromValues($rtLink);
Eventually, I'll need to dynamically generate that URL, inserting the a
value from one of the organization's custom fields as part of the address.
If anyone has tips on that, I'd appreciate help there, too. For now,
though, I just need to get the link itself to work. I'm guessing at where
the code should go, so I'm very probably doing it all wrong. :) Thanks for
any help.
--
Alex Hall
Automatic Distributors, IT department
ahall at autodist.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20180321/24ec30d3/attachment.html>
More information about the vtigercrm-developers
mailing list