docs.roxen.comView this page in a printer friendly mode
DocsRoxenWebServer 5.2Web Developer ManualIf Tags
Copyright © 2015, Roxen Internet Software
Suggestions, comments & compliments
manuals@roxen.com
 DEMO  DOCS  PIKE
 COMMUNITY  DOWNLOAD
www.roxen.com

   

<else>
<elseif>
<false>
<if>
<if accept>
<if client>
<if clientvar>
<if config>
<if cookie>
<if date>
<if defined>
<if domain>
<if exists>
<if expr>
<if false>
<if group>
<if internal-exists>
<if ip>
<if kerberos-auth>
<if language>
<if match>
<if Match>
<if module>
<if pragma>
<if prestate>
<if referrer>
<if scope>
<if sizeof>
<if supports>
<if time>
<if true>
<if type-from-data>
<if type-from-filename>
<if user>
<if variable>
<if Variable>
<if variable-exists>
<then>
<true>

<if defined></if>

Provided by module: Tags: RXML tags

Tests if a certain RXML define is defined by use of the <define> tag, and in that case tests its value. This is an Eval plugin.


Attributes

defined="define"

Choose what define to test.

The define should be provided as type&#0;name-of-define, i.e. the type and the name separated by a NUL (ASCII 0) character. Currently there are two alternatives:

  • tag&#0;name-of-define

  • if&#0;name-of-define

<define tag="hello-world">Hello world</define> <define container="say-hello">Hello, <contents/></define> <define if="person">Matt</define> <if defined="tag&#0;hello-world"> <div><hello-world/>!!</div> </if> <if defined="tag&#0;say-hello"> <div><say-hello>Matt</say-hello></div> </if> <if defined="if&#0;person"> <div> <if person="Matt">Yes, it's Matt!</if> <else>No Matt</else> </div> </if> <if defined="tag&#0;non-defined-thing"><non-defined-thing/></if> <else><div>&lt;non-defined-thing/&gt; is not defined</div></else>
Hello world!!
Hello, Matt
Yes, it's Matt!
<non-defined-thing/> is not defined