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 Support

You may include modules in your Administrator templates directly with mosLoadAdminModule or in groups, like for the site templates, with mosLoadAdminModules. For example:

<table width="100%" class="menubar" cellpadding="0" cellspacing="0" border="0">
  <tr>
    <td class="menubackgr"><?php mosLoadAdminModule( 'fullmenu' );?></td>
    <td class="menubackgr" align="right">
        <div id="wrapper1">
          <?php mosLoadAdminModules( 'header', 2 );?>
        </div>
    </td>
    <td class="menubackgr" align="right">
      <a href="index2.php?option=logout" style="color: #333333; font-weight: bold">Logout</a>
      <strong><?php echo $my->username;?>&nbsp;
    </td>
  </tr>
</table>

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:

  • 0 = just output sequentially what the modules output

  • 1 = display each module in a "Tab"

  • 2 = display each module wrapped in a <div> tag

Formatting for the "header" modules is done completely via CSS. For example, the "wrapper1" style is defined as:

#wrapper1 div {
    border: 0px;
    margin: 0px;
    margin-left: auto;
    margin-right: auto;
    padding: 0px 5px 0px 5px;
    display: inline;
}

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.

mod_fullmenu
The Full Menu module displays the traditional DHTML Adminstrator menu. Content Sections and Components are dynamically added with the remainder of the menu being statically defined.
mod_components
The Components module displays a full list of the Components and sub-menu items. This is useful where many components are installed and the capacity of the DHTML menus is exceeded.
mod_latest
The Lastest Items module displays the most recently created content items.
mod_mosmsg
The Message module displays the message passed in the URL.
mod_online
The Users Online module displays the number of users logged in.
mod_pathway
The Pathway module displays an Administrator pathway.
mod_popular
The Most Popular module displays a list of the most "hit" content items.
mod_stats
The Menu Stats module shows some statistics about the menus.
mod_toolbar
The Toolbar module displays the icon toolbar.
mod_unread
The Unread Messages module displays the number of unread private messages.
mod_logged
This Logged module displays a list of the currently logged in users.
mod_quickicon
The Quick Icon module displays an array of shortcut icons.

The Control Panel

The 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 )