Results 1 to 7 of 7

Thread: Why I can't customize view.detail.php of Accounts

  1. #1
    AlexCh is offline Member
    Join Date
    Apr 2009
    Posts
    17

    Default Why I can't customize view.detail.php of Accounts

    I tried to change the detail view of Account. Made changes in sugarcrm\modules\Accounts\view\view.detail.php but it is not display this changes.

    It is very strange because in another module Cases I made the same changes and it works perfect.

    Has anybody any idea?

  2. #2
    akkimca's Avatar
    akkimca is offline Sugar Community Member
    Join Date
    Dec 2008
    Posts
    271

    Thumbs up Re: Why I can't customize view.detail.php of Accounts

    hi......

    just create this structure
    \sugarcrm\custom\modules\{Ur Module name}\metadata\detailviewdefs.php

    just create the new file in detailviewdefs.php(copy ur detailview.php code in it) than just clear the cache and check is ds working or not.

    all d best
    Regards
    ==========================
    Tanshu
    Work as Sugarcrm Freelancer
    Feel free to Find me in skype. Its my pleasure to talk with you.
    ID: tanshu321

  3. #3
    AlexCh is offline Member
    Join Date
    Apr 2009
    Posts
    17

    Default Re: Why I can't customize view.detail.php of Accounts

    Quote Originally Posted by akkimca View Post
    hi......

    just create this structure
    \sugarcrm\custom\modules\{Ur Module name}\metadata\detailviewdefs.php

    just create the new file in detailviewdefs.php(copy ur detailview.php code in it) than just clear the cache and check is ds working or not.

    all d best
    Hi
    I don't understand how it helps me.
    I already have this file in this path sugarcrm\custom\modules\Accounts\metadata\detailvi ewdefs.php
    and I use it for some customizing.

    But I am trying to overwrite DetailView class
    PHP Code:
    require_once('include/MVC/View/views/view.detail.php');

    class 
    AccountsViewDetail extends ViewDetail {


         function 
    AccountsViewDetail(){
             
    //parent::ViewDetail();
             //turn off normal display of subpanels
            
    $this->options['show_subpanels'] = false;
            
    parent::SugarView();
         }

         function 
    display(){
                    
         
    $this->dv->process(); 
            
            echo 
    $this->dv->display();

            echo 
    "bla-bla-bla";//my custom code

        
    $this->displaySubPanels(); 


         }     


  4. #4
    kuske's Avatar
    kuske is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    Germany
    Posts
    2,678

    Default Re: Why I can't customize view.detail.php of Accounts

    You should not write your redefined view.detail.php to sugarcrm\modules\Accounts\view\view.detail.php but to sugarcrm\custom\modules\Accounts\views\view.detail .php

    If there is already a view.detail.php in the custom directory, the file in modules directory will not be used any more.

  5. #5
    AlexCh is offline Member
    Join Date
    Apr 2009
    Posts
    17

    Default Re: Why I can't customize view.detail.php of Accounts

    Quote Originally Posted by kuske View Post
    You should not write your redefined view.detail.php to sugarcrm\modules\Accounts\view\view.detail.php but to sugarcrm\custom\modules\Accounts\views\view.detail .php

    If there is already a view.detail.php in the custom directory, the file in modules directory will not be used any more.
    I know this. But I in my case I had not a view.detail.php in custom path.
    Moreover I tried to remove file from sugarcrm\modules\Accounts\view\view.detail.php and moved it to sugarcrm\custom\modules\Accounts\views\view.detail .php but it doesn't work.

    It looks like controller don't see this file and don't use it.

  6. #6
    kuske's Avatar
    kuske is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    Germany
    Posts
    2,678

    Default Re: Why I can't customize view.detail.php of Accounts

    Perhaps you can set some debug traces in the view factory module
    include\MVC\View\ViewFactory.php to see which way Sugar runs in your case.

  7. #7
    AlexCh is offline Member
    Join Date
    Apr 2009
    Posts
    17

    Default Re: Why I can't customize view.detail.php of Accounts

    Quote Originally Posted by kuske View Post
    Perhaps you can set some debug traces in the view factory module
    include\MVC\View\ViewFactory.php to see which way Sugar runs in your case.
    Thank you for good idea.
    I found a problem.
    I had sugarcrm\custom\modules\Accounts\view\view.detail .php
    but it should be sugarcrm\custom\modules\Accounts\views\view.detail .php

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. accounts subpanel in project detail view
    By sujji446 in forum Developer Help
    Replies: 0
    Last Post: 2009-05-12, 11:06 AM
  2. accounts subpanel in project detail view
    By sujji446 in forum Help
    Replies: 0
    Last Post: 2009-05-12, 11:04 AM
  3. Showing contact name in accounts detail view
    By monicaDC in forum Developer Help
    Replies: 5
    Last Post: 2009-04-09, 01:59 PM
  4. Accounts Sub-Panel in Contacts Detail View
    By ctigroup in forum Developer Help
    Replies: 3
    Last Post: 2008-10-17, 12:08 PM
  5. Replies: 0
    Last Post: 2007-08-09, 06:34 PM

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
  •