How to hide header in SugarCRM community edition

Actually i am new to sugarcrm and zend frame work too .if anything not able to understand my following question means comment here . Now I am go for my query actually I need to hide the my header portion in all the page . So I followed this link

http://sugarcrm-customization-ash.blogspot.in/2012/06/how-to-hide-all-tab-from-menu-bar.html

mine version is : sugarcrm community Version 6.5.23

Its work charm but its hide the header part in list view and some pages only when I go detail view or edit view its showing all header again not hiding header part in detail view . so I want the hide the header part in each and every page . I don’t have much knowledge about sugarcrm and zend too so . what can do where can I do . Sorry for my bad English

thanks advance

  • In custom/include/MVC/View/views/view.detail.php add the following file:

    <?php

    /*
    * Your installation or use of this SugarCRM file is subject to the applicable
    * terms available at
    * http://support.sugarcrm.com/06_Customer_Center/10_Master_Subscription_Agreements/.
    * If you do not agree to all of the applicable terms or do not have the
    * authority to bind the entity as an authorized representative, then do not
    * install or use this SugarCRM file.
    *
    * Copyright (C) SugarCRM Inc. All rights reserved.
    */


    require_once('include/MVC/View/views/view.detail.php');

    class CustomViewDetail extends ViewDetail {

        /**
         * @see SugarView::display()
         */

        public function displayHeader() {
            parent::displayHeader();
            unset($groupTabs['All']);
            $ss->assign("groupTabs",$groupTabs);
        }

    }

    Override the editview in the same way. In some modules, you'll have to override detailview and editview in that module (i.e. copy modules/<module>/views/view.detail.php to custom/modules/<module>/views/view.detail.php and override the displayHeader class).

  • As per your suggestion i added following code in this file (custom/modules/Leads/views)

    view.detail.php 

    require_once('include/MVC/View/views/view.detail.php');

    class LeadsViewDetail extends ViewDetail
    {

    // function display()
    // {
    // global $sugar_config;

    // If the convert lead action has been disabled for already converted leads, disable the action link.
    // $disableConvert = ($this->bean->status == 'Converted' && !empty($sugar_config['disable_convert_lead'])) ? TRUE : FALSE;
    // $this->ss->assign("DISABLE_CONVERT_ACTION", $disableConvert);
    // parent::display();
    // }

    public function displayHeader() {
    parent::displayHeader();
    unset($groupTabs['All']);
    $ss->assign("groupTabs",$groupTabs);
    }


    }

    but its showing pop up error  that "There was an error processing your request, please try again at a later time."  what's wrong with that .

  • <?php
    if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');

    /*
    * Your installation or use of this SugarCRM file is subject to the applicable
    * terms available at
    * http://support.sugarcrm.com/06_Customer_Center/10_Master_Subscription_Agreements/.
    * If you do not agree to all of the applicable terms or do not have the
    * authority to bind the entity as an authorized representative, then do not
    * install or use this SugarCRM file.
    *
    * Copyright (C) SugarCRM Inc. All rights reserved.
    */


    require_once('modules/Leads/views/view.detail.php');

    class CustomLeadsViewDetail extends LeadsViewDetail
    {

       
    }

    Then run a repair and rebuild and see if you get errors. You have to extend LeadsViewDetail first and include the Leads view.detail file in this instance.  You might want to read up about inheritance in PHP.

    If this works, then try adding this in:

        public function displayHeader() {
            parent::displayHeader();
            unset($groupTabs['All']);
            $ss->assign("groupTabs", $groupTabs);
        }

    To see if that works. If it doesn't, come back to me and I can debug it further.

  • when i add displayheader() function its showing error 

  • And also in 

    modules/Leads/views/view.detail.php 

    there is no function like displayHeader() . only have function name like display() 

  • Hmm, in that case, let's try something else. Copy the entirety of displayheader from the SugarView file into this LeadsView file (and leave out the parent::displayHeader stuff).

  • Yup, but view.detail inherits from ViewDetail (usually in include/DetailView/DetailView2.php). And ViewDetail inherits from SugarView which does have a displayHeader function.

  • I didn't understand . what is the next move 

  • If you paste the contents of your SugarView file, I can tell you what to try next (I'm on a different version of Sugar so I'm not sure what yours looks like).

    Alternatively, have you tried hiding them this way:

    1. Go to Admin

    2. Go to Configure Module Menu Filters
    3. Delete all of the tabs.

  • i need to hide all marked red area .basically the header and menu bar

1 2