Magnolia 4.5 reached end of life on June 30, 2016. This branch is no longer supported, see End-of-life policy.

Page tree
Skip to end of metadata
Go to start of metadata

AdminCentral is a Magnolia user interface for performing site management and configuration tasks. This is where administrators and editors work. Watch a video to get started.

Page layout

AdminCentral is laid out in three areas:

  • Menu provides access to website pages, documents, inbox and other frequently used items.
  • Pages are displayed in a tree view. Documents, workitems in the inbox and data are also displayed in this area.
  • Actions apply to the selected item. For example, to open a page select it in the tree view and click *Open page*. The same actions are available in a right-click context menu.

Menu

Because AdminCentral is implemented in the Admin Interface module, the menu is configured in the module's configuration. There is a shortcut to the menu configuration in the Configuration > Menu. Each node under the menu node represents a menu item that can be customized by changing the configuration properties.

The default menus are:

  • Website. Create and manage web pages. The pages are displayed in a site hierarchy on the right.
  • Documents. Document management system (DMS) for storing documents, images and other binary resources that you want to use on the web pages. Full-text indexed and searchable.
  • Forums. Discussion forums for use on a website. You can manage user permissions with Magnolia's built-in security module.
  • Inbox. Incoming messages such as workflow notifications.
  • Data. Custom data types such as contacts, client references and customer cases. You could for example create a custom data type "Client", populate it with recently client wins and showcase them on your website. Here you can also aggregate RSS feeds from external sources.
  • Templating Kit. Best-practice templating framework that speeds up site creation and reduces project risk. Ships with common use case examples such as articles, news, forms, public user registration and more, yet allows you to create completely custom sites.
  • Security. Manage users, groups, roles and permissions. Public user registration is also managed here.
  • Configuration. Configure AdminCentral, menus, dialogs, workflows, cache, modules and more.
  • Tools. Maintenance tools for logging, importing and exporting, querying, mail and backup.
  • Packager. A tool to help with site migration. You can package an entire website or part of it and move it to a different Magnolia instance.
  • Magnolia Store. Download custom modules that extend Magnolia.

AdminCentral is configurable. You can hide menus and move them around to promote often-used items. By default, Magnolia ships with roles such as superuser, editor and publisher. While superuser can see all menus, editors and publishers see only those that are relevant to their tasks.

Here is an example of AdminCentral with limited menus displayed to user eric who belongs in an editor role.

Menu item types

A menu item can be configured with four parameters (properties):

Parameter

Description

Example

i18nBasename

Basename of the resource bundle with translations of the label.

info.magnolia.module.dms.messages

label

Key for translation of the label. The key will be used as label if no translation is available.

dms.menu

icon

Path to the menu item's icon.

/.resources/icons/24/folders.gif

onclick

Javascript action.

MgnlAdminCentral.showTree('dms')

JavaScript actions

Magnolia provides two basic JavaScript methods which can be used in the menu:

MgnlAdminCentral.showTree(tree,path);
MgnlAdminCentral.showContent(URL);

MgnlAdminCentral.showTree displays a tree in the content area. If a path is passed, then the node addressed by that path will be opened in the tree.

Magnolia provides prepared trees for the most important repositories:

  • users
  • config
  • groups
  • website
  • userroles
  • website-jcr which is a detailed view in the JCR structure of the website repository.

With MgnlAdminCentral.showContent you can pass a URL to a web page or a path to content (without servlet context). The page will then be displayed in the content area. Examples:

  • http://www.magnolia-cms.com
  • /.magnolia/pages/configuration.html

Menu groups

If you create sub nodes under a menu item, the sub nodes will be organized in groups under that menu item. Menu groups can be identified in the menu by the arrow on the right side of the menu entry

When clicked, the group opens and all the child menu actions will be visible. If you specify an onclick action, this action will be executed as well.

Customizing a context menu

To add a customized context menu item:

  1. Modify the prepareContextMenu method in a class that extends AbstractTreeConfiguration .

  2. Add a ContextMenuItem for the new menu item.

  3. Invoke the setOnClick method on the new menu item. As a parameter, pass a string that contains the JavaSCript action that should be taken when the menu item is clicked.
  4. Add the menu item to a tree with the addMenuItem method.

Each tree in AdminCentral, as well as trees included in modules, have a tree configuration class. For example, the website tree has WebsiteTreeConfiguration , the tree in the Forum module has ForumTreeConfiguration, and the tree in Data module has GenericDataAdminTreeConfig.

Here is a snippet from WebsiteTreeConfiguration. The action taken is mgnlTreeMenuItemOpen. It is a function in contextmenu.js which is the function invoked when the menuOpen context menu is clicked.

ContextMenuItem menuOpen = new ContextMenuItem("open");
menuOpen.setOnclick("mgnlTreeMenuItemOpen(" + tree.getJavascriptTree() + ");"); 

tree.addMenuItem(menuOpen);

Another example, this time from the Forum module. The tree is configured in ForumTreeConfiguration.

final ContextMenuItem menuItem = new ContextMenuItem(name);
menuItem.setOnclick("mgnl.forum.TreeHelper.instance." + name + "();");

tree.addMenuItem(menuItem); 

The JavaScript class mgnl.forum.TreeHelper is defined in src/main/resources/mgnl-rsources/js-classes/mgnl/forum/TreeHelper.js in the Forum module and name is a function in that class. Here's an example of one of lock function:

lock: function() {
    var itemType = this.tree.selectedNode.itemType;
    if(itemType == 'mgnl:forum'){
        this.executeCommand('lockForum');
    } else if (itemType == 'mgnl:thread') {
        this.executeCommand('lockThread')
    }
},

The parameter lockForum that gets passed to the executeCommand is a command. The command's class is set to the class that is invoked when executeCommand is invoked. In this case when lockForum is passed to executeCommand, the class LockForumCommand is invoked. Command classes extend BaseRepositoryCommand .

Messages

Error and warning messages are displayed in a dialog on top of the page.

If you attempt to perform an action that is not possible, for example moving a node to an inappropriate location, an error is displayed. To close the dialog and return to the work area click OK.

When you perform an action that has serious consequences, for example deleting a node, a warning dialog is displayed. To close the warning and return to the work area, click either OK to proceed or Cancel.

User account

The currently logged-in user's username is displayed in the top right corner. Click it to edit the account.

Standard users such as editors and publishers have limited access to their accounts. They can only modify the basics: name, password, email and language preference. They cannot modify permissions. Permissions are only visible to the superuser role by default. For more information see Security.

Searching

The search box in the bottom right allows you to search the content of your pages. Page names, titles, content, keywords and descriptions are indexed for search.

Search results are displayed in a list. The gray panel on the right offers grouping and sorting options. Click User, Name or Title to group and sort the results.

Two commands are available in the results list:

  • Open page edits the page.
  • Show in navigation displays the page in the site hierarchy.

You can use your browser Back button to switch between the search results and the site hierarchy.