community.egroupware.org: Community wiki

  
Community wiki
App-Titles and iDots Sidebox Menu

application titles

The application titles are not longer set via $app/setup/setup.inc.php, they are simply the translation of the app-name. The following code gets you the title of $app:
$app_title = $GLOBALS['phpgw_info']['apps'][$app]['title'];

application headers

If your app requires a header (see the StyleGuide), it is set from via the phpgw_info array, eg.:
$GLOBALS['phpgw_info']['flags']['app_header'] = $app_title . ' - ' . lang('Edit');
Depending on the template, a not-set app-header will result in no app-header at all (old templates) or just the app-title for iDots.


To sidebox-menu have to create a hook, called $app/inc/hook_sidebox_menu.inc.php:
<?php
$menu_title = $GLOBALS['phpgw_info']['apps'][$appname]['title'] . ' '. lang('Menu');
$file = Array(
	'New Entry' =>         $GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicalendar.add'),
	'_NewLine_' =>         '', // give a newline
	'Today' =>             $GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicalendar.day'),
	'This week' =>         $GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicalendar.week'),
	'This month' =>        $GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicalendar.month'),
	'This year' =>         $GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicalendar.year'),
	'_NewLine_' =>         '', // give a newline
	'Group Planner' =>     $GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicalendar.planner'),
	'Daily Matrix View' => $GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uicalendar.matrixselect')
);
display_sidebox($appname,$menu_title,$file);

if ($GLOBALS['phpgw_info']['user']['apps']['preferences'])
{
	$menu_title = lang('Preferences');
	$file = Array(
		'Preferences' =>     $GLOBALS['phpgw']->link('/preferences/preferences.php','appname=calendar'),
		'Grant Access' =>    $GLOBALS['phpgw']->link('/index.php','menuaction=preferences.uiaclprefs.index&acl_app=calendar'),
		'Edit Categories' => $GLOBALS['phpgw']->link('/index.php','menuaction=preferences.uicategories.index&cats_app=calendar&cats_level=True&global_cats=True'),
		'Import' =>          $GLOBALS['phpgw']->link('/index.php','menuaction=calendar.uiicalendar.import')
	);
	display_sidebox($appname,$menu_title,$file);
}
Dont forget to name the hook in your '''setup.inc.php' and call Admin->Register all applicationhooks.


Back to eGroupWare / DeveloperDocs
You are here