When you say "when I open modules/Cases/DetailView for editing I don't see any of the sub-panels", does that mean you don't see them in code? Or in studio? Or you don't see them, period -- ever?
I think the 'proper' answer to this lies in modules/Cases/layout_defs.php, but honestly I have had very little luck with that file. Here's what I did to accomplish something similar:
Go to include/SubPanel/SubPanelDefinitions.php. Around line 325, you should see the line:
Code:
return $this->_visible_tabs_array;
That's where your SubPanels get set (in the visible_tabs_array). I wrote a little snippet of code that overwrites the array with the subpanels I want, in the order I want:
Code:
$class_type = get_class($this->_focus);
// This stuff is useful for making your own list of subpanel tabs
/*
echo '<br /> This is the original array of tabs: <br />';
print_r($this->_visible_tabs_array);
echo '<br /> This is the class of the page:<br />';
echo $class_type;
echo '<br />';
*/
if ($class_type == 'Call'){
$this->_visible_tabs_array = array(10 => contacts);
}
if ($class_type == 'Meeting'){
$this->_visible_tabs_array = array(10 => contacts);
}
if ($class_type == 'Contact'){
$this->_visible_tabs_array = array(10 => activities, 20=> history);
}
if ($class_type == 'Account'){
$this->_visible_tabs_array = array(10 => contacts);
}
return $this->_visible_tabs_array; The very first line grabs the class (Account for accounts, Call for call, etc). Then the if() statements just redefine the array how I see fit. If you make "History" the first thing in the array ('10'), it will display first. You can fill in the rest of the array in the order you like, or make most of the panels go away (like I did).
If you uncomment that little bit of code at the top, it should print out the current array and class so that you have a place to start.
Good luck!
Eileen
Bookmarks