This page is still incomplete. Please help us to write a comprehensive CONTENIDO documentation.
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.
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:
For certain links an additional parameter action is appended resulting in an URL like:
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
$url = cRegistry::getSession()->url('main.php?frame=int&area=foo');
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.