Introduction

Document Modes#

imperia documents are dependent on the current workflow step, resp. on the current user action in one of various modes. This depends on whether the document is, for example, processed directly or is currently previewed.
imperia modes are used for hiding particular parts of a document or of the corresponding template, or for performing particular extensions and actions only in certain modes.

The following document modes can be distinguished (and will be explained more detailed in the following sections shown below):

An imperia document can be thought of as a container for all meta data, which is collected in the course of a workflow. This can be done interactively by the user with corresponding HTML forms (meta files, templates, flex modules, workflow plug-ins) or automatically, without interaction, via workflow plug-ins, resp. "hidden" fields in the meta files, templates and flex modules.

After a document has run through the workflow, the system generates files in the document root of the web server with the help of one or more templates. The templates determine in what format the files are stored (text based formats such as HTML, XML, etc.) and what part of the meta data stored in the document should be visualized with the corresponding layout.

Upon publishing, this data is copied using the selected network protocol onto one or more target systems. Optionally, it is possible to export selected meta data of the underlying document into a SQL database.


META mode#

A document is in META mode immediately after it has been generated. In this mode the document is initialized and the meta variables directory , template , filename and metafile are set with the corresponding values from the category.

If the workflow step MetaEdit has been used and the user left this step with the button Save , the document can never return into the META mode, even if the document runs through this step a second time.

Note

If the workflow step MetaEdit has not been completed, but has been canceled via the Cancel button, the document is in META mode, the next time it is edited.

The META mode is often used for extending the directory with a numbered sub-directory, so that every single document generated in one category can have its distinct sub-directory. Such a procedure is preferable when there are many documents stored in one category and they should not overwrite each other, for example - recent news. Also refer to IF Conditions.

However, an extension in meta edit will be executed only when this workflow step has been completed via the Save button.

Note

Apart from the MetaEdit step, there are other ways to change the path of a document in the course of a workflow. It can be done, for example, in the Edit step or by other workflow plug-ins that can change meta information, like the Meta-Setter.


EDIT mode#

The document is in EDIT mode when the corresponding template is displayed and a user enters or edits content. A document can be in edit mode an arbitrary number of times.

By checking whether a document is in Edit mode, certain parts of the template, mostly explanatory information for a user, can be hidden in other document modes. Refer to Hiding Elements.


SAVE mode#

A document is in save mode while being finished, when it exits the workflow.

A practical application of the SAVE mode is to add certain parts of a document, for example the navigation, only when the document exits the workflow. In this way it can be avoided that a user opens other documents via the navigation while editing, additionally by receiving error messages.


PREVIEW mode#

This mode is applied to a document, while being previewed. This can be done with the button Preview during editing, from the desktop by clicking in the Title and URL columns or from the publishing list, when a document has already exited the workflow.

A practical application for the preview mode is to add, for example, a navigation dummy to a document, so that the user can obtain at least a notion of how the final document would look like.


REPARSE mode#

A document is in REPARSE mode when it is reparsed with the template reparser.

Note

Contrary to checking the mode with <!--mode--> EQ SAVE, which refers explicitly to the above mentioned SAVE mode, <!--XX-savemode--> also includes the modes PREVIEW and REPARSE. The reason for this is that when using <!--XX-savemode-->, it is only checked whether the current mode is not EDIT.
Refer also to Querying and Testing a Mode.



Variables#

imperia recognizes meta variables and as a special subgroup of these - the so-called imperia variable. Meta variables hold, for example, the content, which the user enters into a document. Variables that control the path of documents through a workflow or the automatic publishing date, are also saved in meta variables.

imperia variables such as the __imperia_modified variable, are generated by the system and automatically filled with values. Modifying these variables should be avoided. A list of all relevant imperia variables can be found in imperia Variables.

An imperia document consists of key-value pairs, where the key is the name of a variable. This can be both imperia and meta variables. imperia variables contain document properties such as creation date, last modification date, etc. Meta variables contain values entered by a user or saved via a template, resp. a meta file.