© Copyright Excosoft. Powered by Skribenta CCMS® and Topic Finder CDP®

Find and navigate

Filters


Add/remove/view favorites


Table of contents

File properties

Conditionalizing several block elements

Background

The procedure in this topic assumes Skribenta is installed and configured for normal operation, and:

You need to conditionalize several adjacent block elements, to be able to use the same content file for multiple publications.

It is possible to conditionalize several adjacent block elements together by wrapping them in an if-wrapper.

By using a variable in the condition, the condition can be evaluated differently depending on the variable value defined in the publication's configuration file. You can then use the same content file in multiple publications, and let the variable value control the published output.

About this task

This instruction tells you how to conditionalize several adjacent block elements together.

This is the file content before conditionalizing two adjacent paragraph elements.

This is the file content before conditionalizing two adjacent paragraph elements.

In the shown images, the XML tags are visible. To show XML tags, see Turning XML element tags on or off.

Select adjacent block elements, then click Block > Wrapper > If on the top toolbar. Type the condition inside the created If wrapper title element.

5 minutes

Procedure

In the shown images, the XML tags are visible. To show XML tags, see Turning XML element tags on or off.

1. Make sure that the step(s) in section "Starting point" (see section "Background" above) are performed.

The Wrapper list opens.

A wrapper element with class if, and a title element are created.

In this example the condition is a boolean variable.

All content in the If wrapper element is now conditionalized.

  • Publish the publication

    or

  • Evaluate the condition directly in the content file, see .