Fixed gh-529 so that the custom admin view does not hidemainmenu when it is selected as the default view (dashboard)

This commit is contained in:
2020-04-23 23:15:07 +02:00
parent b078d7f01f
commit e83319635a
10 changed files with 92 additions and 57 deletions

View File

@ -48,9 +48,7 @@ class ###Component###View###SView### extends JViewLegacy
* Setting the toolbar
*/
protected function addToolBar()
{
// hide the main menu
$this->app->input->set('hidemainmenu', true);
{###HIDEMAINMENU###
// set the title
if (isset($this->item->name) && $this->item->name)
{
@ -62,11 +60,7 @@ class ###Component###View###SView### extends JViewLegacy
$title = JText::_('COM_###COMPONENT###_###SVIEW###');
}
// add title to the page
JToolbarHelper::title($title,'###ICOMOON###');
// add the back button
// JToolBarHelper::custom('###sview###.back', 'undo-2', '', 'COM_###COMPONENT###_BACK', false);
// add cpanel button
JToolBarHelper::custom('###sview###.dashboard', 'grid-2', '', 'COM_###COMPONENT###_DASH', false);###CUSTOM_ADMIN_CUSTOM_BUTTONS###
JToolbarHelper::title($title,'###ICOMOON###');###CUSTOM_ADMIN_CUSTOM_BUTTONS###
// set help url for this view if found
$help_url = ###Component###Helper::getHelpUrl('###sviews###');

View File

@ -48,15 +48,9 @@ class ###Component###View###SViews### extends JViewLegacy
* Setting the toolbar
*/
protected function addToolBar()
{
// hide the main menu
$this->app->input->set('hidemainmenu', true);
{###HIDEMAINMENU###
// add title to the page
JToolbarHelper::title(JText::_('COM_###COMPONENT###_###SVIEWS###'),'###ICOMOON###');
// add the back button
// JToolBarHelper::custom('###sviews###.back', 'undo-2', '', 'COM_###COMPONENT###_BACK', false);
// add cpanel button
JToolBarHelper::custom('###sviews###.dashboard', 'grid-2', '', 'COM_###COMPONENT###_DASH', false);###CUSTOM_ADMIN_CUSTOM_BUTTONS###
JToolbarHelper::title(JText::_('COM_###COMPONENT###_###SVIEWS###'),'###ICOMOON###');###CUSTOM_ADMIN_CUSTOM_BUTTONS###
// set help url for this view if found
$help_url = ###Component###Helper::getHelpUrl('###sviews###');