docs.roxen.comView this page in a printer friendly mode
DocsRoxenWebServer 3.3TutorialsIf tags
Copyright  2004, Roxen Internet Software
Suggestions, comments & compliments

The basics of if-else
If tags syntax
If plugins
A basic example
<if> and <define>
<if supports>

If tags

Welcome to the Lesson about RXML If tags!

As you surely know, a typical web page consists of text and HTML tags sent over the Internet from a web server to a browser. The HTML tags tell the browser how the page should be displayed.

The Roxen Macro Language, RXML, offers a number of tags which are used in the same way as HTML tags, but extend the sometimes quite limited power of HTML. One group of RXML tags are the If tags. These tags make it possible to create dynamic pages based on conditions. You could let authenticated users only get confidential information of a page or optimize pages for different kinds of browsers. If tags also make it possible to create web applications in RXML without using any programming language.

Hopefully this brief presentation has made you curious about the powers of If tags. If so, please don't hesitate to read the following Sections of this Lesson.

This Lesson is designed so that you may move around as you please. Feel free to read only the Sections that interest you.

After reading this Lesson you will be able to program web pages using If tags and you will know some of their many useful features. As in most creations, a tutorial isn't enough to become a master. Only hard work will get you there...


The basics of if-else statements introduces the logic of if-else statements in general to beginners in programming. If you have some experience in programming, skip this Section.

The syntax of If tags introduces the syntax of the If tags, including tags, attributes and operators.

If plugins introduces the If plugins and briefly explains the usage of each plugin.

A basic example of <if> shows a very basic example of how to use <if> in a web page to get you started.

Combining <if> and <define> explains how to combine and use <if> and <define> to dynamically show contents of a web page.

Browser independency with <if supports> deals with the <if supports> plugin, used to match contents with the browser requesting the page. Also discusses the related page and client scopes.

In the Summary you will find the essence of this Lesson and references to further sources of knowledge.

Detailed information about If tags is found in the Web Developer Manual.