Hi everyone,
Im trying to display a subpanel view that only shows the buttons to create a Task, Meeting, Call, and Note without the collection_list part. I gave it my best trying to create a layout_def that would only show those buttons. Whenever i remove the collection_list i error out saying "Error running count query for Contact List: Query Failed:::MySQL error 1065: Query was empty". I found some examples of what the layout_defs should look like inside the SugarHome/include/SubPanel/subpanels.txt but i believe those examples are old and i couldnt get them to work
Has anyone successfully been able to do what im trying to do? if so, could you share how you were able to achieve it
Thanks,
Cris
The following is my layout_def and how i am calling the subpanel display code.
$layout_defs = array(
// list of what Subpanels to show in the DetailView
'subpanel_setup' => array(
'activities' => array(
'order' => 10,
'sort_order' => 'desc',
'sort_by' => 'date_start',
'title_key' => 'LBL_ACTIVITIES_SUBPANEL_TITLE',
'type' => 'collection',
'subpanel_name' => 'activities', //this values is not associated with a physical file.
'module'=>'Activities',
'top_buttons' => array(
array('widget_class' => 'SubPanelTopCreateTaskButton'),
array('widget_class' => 'SubPanelTopScheduleMeetingButton'),
array('widget_class' => 'SubPanelTopScheduleCallButton'),
array('widget_class' => 'SubPanelTopCreateNoteButton'),
),
'collection_list' => array(
'meetings' => array(
'module' => 'Meetings',
'subpanel_name' => 'ForActivities',
'get_subpanel_data' => 'meetings',
),
)
),
),
);
require_once('include/SubPanel/SubPanelTiles.php');
$subpanel = new SubPanelTiles($focus, '',$layout_defs);
echo $subpanel->display();


LinkBack URL
About LinkBacks



Reply With Quote
Bookmarks