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

Find and navigate

Filters


Add/remove/view favorites


Table of contents

File properties

Conditionalizing a single block element

Background

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

You need to conditionalize all the content in an element to be able to use the same content file for multiple publications.

It is possible to conditionalize an element, and thereby all the content in the element, by adding a Condition attribute to the element.

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.

Setting a condition on the include element is not recommended. Instead, set the condition on the included file's maintitle if the condition applies to all places the file is included. If the condition do not apply for all the different places an included file is reused, wrap the include element in an if-wrapper element.

About this task

This instruction tells you how to conditionalize an element, and thereby all the content in the element.

This is the file content before conditionalizing a paragraph element.

This is the file content after conditionalizing a paragraph element.

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

Right-click the element and select it from the pop-up list, then click Attributes > Condition. Type the condition in the Condition box and then click Apply.

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.

A pop-up list opens.

A toolbar opens.

The Condition tab opens.

In this example the condition is a boolean variable.

The Condition attribute is set on the element.

  • Publish the publication

    or

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