| Administrator Templates |
At this time the model for Administrator Templates is
still being formed. It is intended that both the Site and
Administrator templating systems will merge into
a common API in a future version. However, some notes are
provided here for reference.Module SupportYou may include modules in your Administrator templates directly with mosLoadAdminModule or in groups, like for the site templates, with mosLoadAdminModules. For example:
The mosLoadAdminModule function takes one argument, the name of the module less the "mod_" prefix. The first cell of the example table loads the Full Menu module (that is, mod_fullmenu). In the second table cell, all the modules assigned to the "header" position are loaded. The second argument is a style setting:
Formatting for the "header" modules is done completely via CSS. For example, the "wrapper1" style is defined as:
The modules are enclosed in plain <div> tags. To display modules in a column you may add a width attribute and change the display attribute appropriately. The following modules are available with the Joomla distribution.
The Control PanelThe Control Panel for the Administrator is a separate file, cpanel.php, that is included with the template. It is a separate file to allow for customisation of this area as different sites and users are likely to have different needs for this valuable piece of screen real estate. The Control Panel file does not need to be included but if it is included it will simply display any Administrator Modules published in the "cpanel" position. The cpanel.php file could be as simple as the following example: <?php /** * @version $ Id: cpanel.php,v 1.3 2004/08/12 08:29:21 rcastley Exp $ * @package Joomla * @copyright Copyright (C) 2005 Open Source Matters. All rights reserved. * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php * Joomla! is free software and parts of it may contain or be derived from the * GNU General Public License or other free or open source software licenses. * See COPYRIGHT.php for copyright notices and details. */ /** ensure this file is being included by a parent file */ defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' ); ?> <table class="adminform"> <tr> <td width="100%" valign="top"> <?php mosLoadAdminModules( 'cpanel', 1 ); ?> </td> </tr> </table> |
|||
| Last Updated ( Wednesday, 14 September 2005 ) | |||