Child pages
  • Backend architecture
Skip to end of metadata
Go to start of metadata

This page is still incomplete. Please help us to write a comprehensive CONTENIDO documentation.

Overview

This page describes the CONTENIDO backend architecture. You will learn what areas, actions and frames are, how the main- and subnavigation  work and how this can be extended by a plugin.

  • ActionAn action is a name for a certain task that should be performed when requesting a page in the CONTENIDO backend.
  • AreaAn area is a name for a set of scripts that should be executed when a certain subnavigation item is clicked.
  • FrameThe CONTENIDO backend is divided into several frames.
  • NavigationThe navigation consists of the main- and subnavigation.

Backend URLs

Each page in the CONTENIDO backend corresponds to a PHP script in ROOT/contenido/includes. Instead of calling these scripts directly by URL, links in the backend have this form:

main.php?contenido=hash&frame=int&area=foo

For certain links an additional parameter action is appended resulting in an URL like:

main.php?contenido=hash&frame=int&area=foo&action=bar

This imposes some questions: what are frames, areas and actions? And why is that so complicated, wouldn't it be easier to call the scripts directly?

To create a backend URL in your plugin you could use the session object. It has a method url() which allows to extend a given URL by the current backend session ID, a hash value which is transfered as parameter contenido.

$url = cRegistry::getSession()->url('main.php?frame=int&area=foo');

main.php

The script main.php is responsible to map the given frame and area to the corresponding PHP script. This mapping is stored in the database.

This allows us to modify or extend the CONTENIDO backend easily by adding further backend pages. This can be achieved by developing a plugin.

Let's have a look at the tables which are related to frames, areas, actions and also the main- and subnavigation which will be described later.

In order for a PHP file to be callable via main.php it has to have a record in the files table. This requires a relation to an area in the area table. An area can best be described as a set of backend scripts that serve a common purpose and belong to a subnavigation item. It's not much more than a name having some properties which will be described in the area page in detail. As you might have seen the CONTENIDO backend still uses frames. In order to let CONTENIDO know in which frame a script will be displayed in, the record in the files table has to be mapped to its frame which is achieved by another record in frame_files table. With all these records CONTENIDO is able to call a script, but still a link, i.e. a navigation item, to call it is missing. That's what the main- and subnavigation is needed for.

  • No labels