Results 1 to 5 of 5

Thread: Modifying Header Links

  1. #1
    tylerkolden is offline Member
    Join Date
    Sep 2009
    Posts
    10

    Default Modifying Header Links

    I have just updated to SugarCRM 6.2.1 and would like to modify a link in the header. Specifically, I would like to change the hyperlinked username following the 'Welcome' text to take a user to their Employee module record instead of their Users module record.

    In SugarCRM 5.5.2 I accomplished this task through the following steps:

    Step 1: Navigate to /include/ and open globalControlLinks.php

    Step 2: Locate the following block of code

    $global_control_links['myaccount'] = array(

    ‘linkinfo’ => array($app_strings['LBL_MY_ACCOUNT'] => ‘index.php?

    module=Users&action=DetailView&record=’.$current_u ser->id.”),

    ‘submenu’ => ”

    );

    Step 3: Replace it with the following block of code

    $global_control_links['myaccount'] = array(

    ‘linkinfo’ => array($app_strings['LBL_MY_ACCOUNT'] => ‘index.php?

    action=DetailView&module=Employees&record=’.$curre nt_user->id.”),

    ‘submenu’ => ”

    );


    This same technique doesn't seem to work in 6.2.1.

    I have looked at the welcome.tpl file in \themes\default\tpls but wasn't able to locate where I could change the hyperlink.

    Any help would be greatly appreciated!

  2. #2
    smbslt42 is offline Sugar Community Member
    Join Date
    Sep 2010
    Posts
    28

    Default Re: Modifying Header Links

    The way we did it is by using custom/include/globalControlLinks.php. "include/globalControlLinks.php" has an include statement that references the custom one.

    In the custom one, we unset the old link and then added the code for the custom one.

    unset($global_control_links['myaccount']);

    $global_control_links['myaccount'] = array(

    ‘linkinfo’ => array($app_strings['LBL_MY_ACCOUNT'] => ‘index.php?

    action=DetailView&module=Employees&record=’.$curre nt_user->id.”),

    ‘submenu’ => ”

    );

  3. #3
    jlabuelo is offline Sugar Community Member
    Join Date
    Apr 2008
    Posts
    426

    Default Re: Modifying Header Links

    Hi all

    I am trying to call a secondary web application calling it from one of the links included in the header of the screen.

    To do so I have modifyed the globalControlLinks.php file adding this code:

    Code:

    Code:
    $global_control_links['employees'] = array(
    'linkinfo' => array($app_strings['LBL_EMPLOYEES']=> 'http://91.117.53.175:8080/binomi'),
    'submenu' => ''
    );
    As you can see I have just added the url to the secondary application, and it is launched in the same browser, but now I would like also to get this:

    a) would like the secondary application to appear in a different tab in the browser so I can use SugarCRM and this application.

    b) This secondary application has a login and password screen that I would like to join by using already the current_uer_id and password of the user in SugarCRM. To do this, I need to launch a POST call to this url using variable "j_login" and "j_password". ¿Any ideas about how I can include this POST call in this link?

    Thanks a lot guys

  4. #4
    rafael.q.g@hotmail.com's Avatar
    rafael.q.g@hotmail.com is offline Sugar Community Member
    Join Date
    Jun 2011
    Location
    Florianópolis - Brazil
    Posts
    782

    Default Re: Modifying Header Links

    You can check the file include/MVC/view/SugarView.php There is teh method which builds the header links, there you can easialy customize it.
    Rafael Queiroz Gonçalves
    Advanced OMG UML Certified Professional
    Sun Certified Enterprise Architect for the Java Platform
    Sun Certified Programmer for the Java 2 Platform
    IBM Certified Advanced Application Developer - Lotus Notes and Domino
    IBM Certified Application Developer - IBM WebSphere Portlet Factory
    Computer Science Mastering / UFSC - PPGCC

  5. #5
    Kupido is offline Sugar Community Member
    Join Date
    Apr 2011
    Posts
    60

    Default Re: Modifying Header Links

    Quote Originally Posted by smbslt42 View Post
    The way we did it is by using custom/include/globalControlLinks.php. "include/globalControlLinks.php" has an include statement that references the custom one.

    In the custom one, we unset the old link and then added the code for the custom one.

    unset($global_control_links['myaccount']);

    $global_control_links['myaccount'] = array(

    ‘linkinfo’ => array($app_strings['LBL_MY_ACCOUNT'] => ‘index.php?

    action=DetailView&module=Employees&record=’.$curre nt_user->id.”),

    ‘submenu’ => ”

    );

    then i copy the file to custom/include i get an internal 500
    What code do you write in the "standard" globalcontrollinks.php?

    thx best regards`?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. TPL Assignment in header
    By Cedric K in forum Developer Help
    Replies: 5
    Last Post: 2010-12-17, 05:52 PM
  2. Header file for 5.5.0a
    By enicot in forum Developer Help
    Replies: 2
    Last Post: 2010-04-25, 08:48 PM
  3. Hide/Show mail links in header
    By JackieEstacado in forum Help
    Replies: 3
    Last Post: 2007-07-27, 12:33 PM
  4. Renomear Tag/Header
    By agoulart in forum Portugese
    Replies: 5
    Last Post: 2007-07-24, 06:26 PM
  5. Blank bar above header bar
    By cyberflex in forum General Discussion
    Replies: 2
    Last Post: 2005-08-18, 01:33 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •