Use of content highlighting in projects
The "Content Highlighting" funktionality is supported only in the integrated preview in the FirstSpirit JavaClient. It is not available in the preview - in an external browser (e.g. Mozilla Firefox or Microsoft Internet Explorer) or - in a separate window of the JavaClient (menu "View" / "Display area of the preview" / "in separate window") |
Special format templates are used for the content highlighting function:
These are already included in FirstSpirit's scope of supply and as a default are located in the Templates Store, in the "WebClient Format Templates (EasyEdit)" folder, below the format templates node. They must be inserted in a suitable place in the page, section and/or table templates, in which the content highlighting is to be used, namely in the HTML channel. This is done using the following call:
$CMS_RENDER(template:"IDENTIFIER_OF_THE_FORMATTEMPLATE")$
The definition of the border is implemented with the help of 2 CSS classes:
- fsPreview_default
and
- fsPreview_accentuated
These must be defined in each project in which content highlighting is to be used. The following 3 options can be used for this:
- Integrating a style sheet: The necessary classes are included in the "WE_css" style sheet, which belongs to the scope of supply of FirstSpirit. As a default, it is located in the Media Store, in the "WebClient Media (EasyEdit)" folder (reference name: "WEBeditInplace").
This style sheet is integrated in the page templates in which content highlighting is to be used:
<link href="$CMS_REF(media:"WE_css")$" rel="stylesheet" type="text/css"/> - Integrating a render format template: Alternatively, the render format template WEBeditInplaceIncludeJS can be integrated. If Easy Edit is to be used at the same time, this format template must be used:
$CMS_RENDER(template:"WEBeditInplaceIncludeJS")$ - Define CSS classes themselves: If necessary, the classes themselves can be defined in a CSS style sheet.
Content highlighting and Easy-Edit
Some of the format templates used for content highlighting are also used for Easy-Edit. However, in some cases the function and configuration differ substantially from each other. Notes on the joint use of Easy-Edit and content highlighting in page, section and table templates are given in the description of the individual format templates.
The Java Script functions of Easy-Edit are NOT used. |
If Easy-Edit is used at the same time, it is necessary to check that the layout of the pages is faultless, both in the integrated preview and in the Easy-Edit view. |
Selecting the preview page
The "Preview Page" field in the "Properties" tab can be used for each template to select the page reference on which a preview is to be based.
The choice of an appropriate preview page in the corresponding table template is relevant for the highlighting of data sets from the Content Store. It this way, the page reference to be used as the basis for a data preview from the Content Store is defined. Although a data set can be output on several pages of a project, only one page reference in whose context a data set from the Content Store is to be output can be defined here.
The choice of preview page must be taken into account in all templates which use the same data source.
General notes on template development for content highlighting
If input components in pages, sections or data sets within the work area still do not contain any content, it is not possible to highlight. Therefore, if using the render format templates
it is advisable to check whether the output is empty or not.
This can be checked, for example, by using the .isEmpty method in combination with $CMS_IF(...)$:
$CMS_IF(!BEZEICHNER.isEmpty)$
$CMS_VALUE(BEZEICHNER)$
$CMS_END_IF$