About automatic assignment of a format to an article element

Build 1501 on 14/Nov/2017  This topic last edited on: 1/Sep/2016, at 14:22

On creation of an article element, a format is automatically assigned to it, following certain rules, and depending on the way of article element creating.

For the default formats on frames on page, see Set default format for a frame.

Rules of auto-assignment of a format to an article element

There are the following cases:

1.You are creating an article on the Articles main tab, using the standard ArticleNewDlg system script, but no group the current user is member of, neither the user himself, has no parameter articleFormatName, or it is an empty string.

or

You are adding article element to an existing article.

Outcome: the following rules are applied in the following order for the automatic assignment of a format when creating an article element:

If exists a format with the same name as article element (e.g. Body format for a Body article element), and to the format is assigned the same type as the article element (e.g. Body type for the Body format), such format is automatically assigned, even if there are other formats that have the same type.

If doesn't exist a format with the same name as article element, or if to the format is not assigned the type of the article element, then the format with the lowest database ID having the required type is assigned automatically. Example: you do not have a Body format, or you have it, but to it is not assigned the Body type; however, you have format with any name and assigned to a body type: the one among them with the lowest id is assigned to the element.

If there is no format assigned to the type of the element you are creating, then the format with the lowest database ID and having no type is assigned automatically. Example: the xyz format is the format with the lowest database ID and no type: it is assigned to the article element.

2.You are creating an article on the Articles main tab, using the standard ArticleNewDlg system script, and in any group the current user is member of, or on the level of the user himself, there is a valid format name, specified in the parameter articleFormatName.

Outcome: the specified format is assigned to all article elements, independently of other settings, as long the specified format has no type.