Start page / Template development / Rules / Restriction levels

Controlling editorial processes (restriction levels)

Every rule is executed within a restriction level. The assignment of a restriction level makes it possible for the template developer to intervene in the editorial process more or less restrictively.

Using the SAVE tag, for example, the saving of an invalid entry can be inhibited by the editor (highest restriction level). The editor recognizes that the form has an “invalid” state during the editing of the form already, and not during saving.

Depending on the selected restriction level, invalid states in the form are emphasized in color (see Display in the working area).

The FirstSpirit framework knows the following restriction levels for rule definition:

  • Highest restriction level:
    SAVE inhibits the saving of an invalid entry.
  • Medium restriction level:
    RELEASE inhibits the release of an invalid entry.
  • Lowest restriction level:
    INFO controls editorial processes without inhibiting a release or saving of the invalid entries. Rules performed within this restriction level can be used very universally.

In the process, the following applies for the definition of a restriction level:

  • The definition of a restriction level has to take place within a <VALIDATION/> tag using the attribute “scope”.
  • If no restriction level is defined, the restriction level INFO is used by default.

Example:

<RULES>
<RULE>
...
<DO>
<VALIDATION scope="SAVE">
<PROPERTY name="VALID" source="st_headline"/>
<MESSAGE lang="*" text="A headline must be provided!"/>
<MESSAGE lang="DE" text="Es muss eine Überschrift erfasst werden!"/>
</VALIDATION>
</DO>
</RULE>
</RULES>
Important If more than one rule is defined for one form element and if there is more than one rule violated, only the most significant restriction level will be shown in the form. This is valid for several rules within the rule defintion and for interferences of rules and restrictions which are defined for an input component using parameters within the form (e.g. mandatory field definition via the parameter allowEmpty=“no”).

Order of display:
  1. Violated rule with restriction level SAVE and violated form definition (e.g. allowEmpty)
  2. Violated rule with restriction level RELEASE
  3. Violated rule with restriction level INFO

If, for example, a mandatory field option (allowEmpty=“no”) and a rule with RELEASE attribute is defined for an input component and if both conditions are violated, first the violated mandatory field option will be shown in the form (and the display of the second rule violation will be suppressed). The second rule violation will only then shown if the mandatory field option is achieved in the form.

© 2005 - 2024 Crownpeak Technology GmbH | All rights reserved. | FirstSpirit 2024.13 | Data privacy