Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Any Way To Control Subpanel Layout?

  1. #1
    machineghost is offline Senior Member
    Join Date
    Oct 2008
    Posts
    51

    Default Any Way To Control Subpanel Layout?

    The Studio feature in SugarCRM is incredibly powerful, not to mention just generally all-around awesome and incredible. However, one thing it seems to be missing is a way to control the layout of a module when that module is represented as a subpanel of another module (eg. the layout of Project Tasks under a Project).

    Is there anyway to control this layout (presumably outside the oh-so-wonderful Studio?).

  2. #2
    RolusTech's Avatar
    RolusTech is offline Sugar Community Member
    Join Date
    Aug 2008
    Posts
    429

    Lightbulb Re: Any Way To Control Subpanel Layout?

    Hi,

    Please excuse my ignorance; but I am not sure if there was a bit of sarcasm in your appreciation of the Studio tool or were you actually appreciating its functionality? Nonetheless, I feel that Studio is a great tool; providing great luxury/ease for the developer/administrator.

    Now, answering your question:

    Yes! We can change the layout of subpanels without the help of studio.

    We can change the layout by editing some files as there are some files which are responsible to keep the layout of subpanels.

    If you would like to find out more, then lets talk on skype: rolustech.

    Best,

    M H N
    Rolustech

  3. #3
    machineghost is offline Senior Member
    Join Date
    Oct 2008
    Posts
    51

    Default Re: Any Way To Control Subpanel Layout?

    RolusTech: No sarcasm, really. I've been bitter in posts before when things in SugarCRM don't work "as advertised," but the Studio really is incredible. Well, I actually mean the Studio/Module Builder/Drop-down Editor; together they allow an amount of customization that is above and beyond anything I've ever seen in an enterprise software product. Also, I used SugarCRM a few years ago back when those features were newer (some may not have existed at all; I forget), and they were nowhere near as reliable, bug-free, or easy to use as the current tools. So I honestly am grateful for them.

    However, I don't have access to Skype (and my workstation doesn't have a microphone). Is there anyway you can provide some basic details of what files I need to edit (and how to edit them) in this thread? If not, could we talk over private message, AIM, or Google Chat?

  4. #4
    machineghost is offline Senior Member
    Join Date
    Oct 2008
    Posts
    51

    Default Re: Any Way To Control Subpanel Layout?

    RolusTech was a contractor, and I'm really just looking for a basic answer here (I can do all the "heavy lifting" myself). So ... back to square one.

    Can anyone point me to the php file that controls the sub-panel layout of a module? Based on everything I've seen in SugarCRM so far, I'm sure there must be some standard pattern that the framework uses when it needs to determine "hey, I need to show a list of project tasks on a project page; how do I do that?" and if I just knew what that pattern was I'm confident that I could figure out how to edit the PHP to change the layout.

    Any assistance would (as always) be greatly appreciated; thanks.

  5. #5
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,343

    Default Re: Any Way To Control Subpanel Layout?

    There are some subpanels that you can edit in Studio. For those that you can't go to your modules metadata:
    modules/YOURMOD/metadata/subpaneldefs.php and find the subpanel module you want to edit. Take note of the subpanel_name value. Now go to that module:
    modules/SUBPANELMOD/metadata/subpanels/SUBPANEL_NAME.php

    You should be able to just copy and paste that to:
    custom/modules/SUBPANELMOD/metadata/subpanels/SUBPANEL_NAME.php

    Then you can alter it as you please. I may have missed a few things here so please correct me if I'm a bit off.

  6. #6
    machineghost is offline Senior Member
    Join Date
    Oct 2008
    Posts
    51

    Default Re: Any Way To Control Subpanel Layout?

    EggSurplus, you truly deserve your title of "Sugar Hero"! Thank you so much for your help; your instructions worked perfectly.

    As an aside, is there any kind of document anywhere that details the SugarCRM filesystem? I'm thinking of something that says:

    modules/*MODULE NAME*/metadata/subpaneldefs.php:
    defines (among other things) which subpanels to use, and which layout (via the "subpanel_name value") to use for them

    modules/*MODULE NAME*/metadata/subpanels/*LAYOUT NAME*.php:
    defines a layout that may be used to render this module as a subpanel of another module

    Does anything even remotely like this exist anywhere? Or does the knowledge of what file does what reside only in the collective heads of the users of this forum?

  7. #7
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,343

    Default Re: Any Way To Control Subpanel Layout?

    Glad to help! You may try the wiki or developer sites:
    http://wiki.sugarcrm.com
    http://developer.sugarcrm.com/

  8. #8
    mcichelli is offline Sugar Community Member
    Join Date
    Jun 2006
    Posts
    81

    Default Re: Any Way To Control Subpanel Layout?

    As a related question - where is the Title value on the subpanel defined? I have a module created with the Module Builder that has a subpanel under Accounts. All is fine with it EXCEPT the title on this subpanel is a very long string that looks like the name of a variable somewhere instead of the module name.

    It shows up as LBL_ACCOUNTS_PRODH_PRODUCT_HISTORY_FROM_PRODH_PROD UCT_HISTORY_TITLE
    instead of something simple like "Products" or even "PRODH_PRODUCT_HISTORY" which is the module name.

    Any hints would be much appreciated.

    Incidentally, I agree that the Studio, Module Builder, etc. is wonderful.

    Martha

  9. #9
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,343

    Default Re: Any Way To Control Subpanel Layout?

    Usually for finding where variables are I do a search in a files for that string. In this case I'd do a search/find for LBL_ACCOUNTS_PRODH_PRODUCT_HISTORY_FROM_PRODH_PROD UCT_HISTORY_TITLE and see where it leads me.

  10. #10
    mcichelli is offline Sugar Community Member
    Join Date
    Jun 2006
    Posts
    81

    Default Re: Any Way To Control Subpanel Layout?

    I did that and found in the files

    sugarcrm\custom\Extension\modules\Accounts\Ext\Lay outdef\customaccounts_prodh_product_history.php and
    \sugarcrm\custom\Extension\modules\Accounts\Ext\La youtdefs\_overrideAccountprodh_Product_Historydefa ult.php

    $layout_defs["Accounts"]["subpanel_setup"]["accounts_prodh_product_history"] = array (
    'order' => 100,
    'module' => 'prodh_Product_History',
    'subpanel_name' => 'default',
    'sort_order' => 'asc',
    'sort_by' => 'id',
    'title_key' => 'LBL_ACCOUNTS_PRODH_PRODUCT_HISTORY_FROM_PRODH_PRO DUCT_HISTORY_TITLE',
    'get_subpanel_data' => 'accounts_prodh_product_history',
    );



    Martha
    Last edited by mcichelli; 2008-12-30 at 07:47 PM.

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: 2007-09-03, 09:44 AM
  2. Subpanel Layout Not Holding
    By Courtenell in forum Help
    Replies: 0
    Last Post: 2007-02-26, 12:45 AM
  3. Subpanel field layout
    By skovron in forum Help
    Replies: 1
    Last Post: 2006-02-10, 01:37 AM
  4. Subpanel Layout Question
    By minitergroup in forum Customer Support
    Replies: 0
    Last Post: 2006-01-20, 05:17 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
  •