Home > Contents > Index >
Template Tag TOC  |   Alpha TOC  |   Tag Family TOC  |   Purpose TOC  |   Annotated TOC  |   Index 

 

IF

Processes other tags or displays text based on a logical condition.

Syntax

Parameters

COND (required)
String comparison of two string values. The operators supported are "=" (values are equivalent) or "!=" (values are not equivalent)".

The following are conditions that Content Server provides for use with the IF tag; all these subconditions return either true or false:

Tests whether this is a table.
Tests for the existence of a column in a list.
Tests for the existence of a counter.
Tests for the existence of an element.
Tests whether the errno is actually an error.
Tests for the existence of a list.
Tests whether the given name is an object table.
Tests for the existence of a session variable.
Determine whether Content Server is revision tracking a specified table.
Tests whether the given name is a tree table.
Tests for the existence of a variable.

Description

The IF tag processes other tags or displays text based on a logical condition. If the condition is true, the content of the THEN tag is processed. If the condition is false, the content of the ELSE tag is processed. The THEN tag is required as part of an IF tag. The ELSE tag is not required.

errno

The value of errno is unchanged.

Example

The following example prints the message Color is red. if the value of Variables.color is red.

This example tests for the existence of the variable, color. If a variable named color has been set prior to this test, The variable color exists. is displayed.

  Home > Contents > Index >

FatWire XML Tag Reference
Copyright 2005 by FatWire Software
All rights reserved.