<we:conditionAdd>
Since version: 2.2.0.0 | Requires endtag: no | Required modules: object
Description
This tag is used to add a new rule or condition within a <we:condition> block.
Attributes
field
Default value: - | since version: 2.2.0.0 | required: yes
Set this attribute to the name of the object field which is to be compared.
value
Default value: - | since version: 2.2.0.0 | required: no
Set this attribute to a value which will be compared with the contents of the field defined in "field".
compare
Default value: - | since version: 2.2.0.0 | required: no
Set this attribute to the type of operation to be performed. Valid parameters are: = equal to !=
unequal to
<
less than
>
greater than
⇐ less than or equal to
=greater than or equal tolike
wildcard matching %
Note: Always use the HTML notification for ">" and "<" i.e. < and > because they are not allowed within we:tags.
Allowed values:
- =
- !=
- <
- >
- <=
- >=
- like
var
Default value: - | since version: 2.2.0.0 | required: no
Set this attribute to the name of a variable whose content is to be compared with the content of the field as defined in "field".
type
Default value: - | since version: 2.2.0.0 | required: no
Set this attribute to the type of variable to be compared with "field". Valid parameters are:
global Set this attribute to global to compare "field" with a global variable. Similarly, if you do not set this attribute at all, you will compare "field" with a global variable. request
This attribute setting enables the use of a request variable as comparator. A Request variable is a variable which is either passed to the page in the URL (page.php?cat=film) or within the http header. These variables are also know as PUT or GET variables.
sessionField This attribute setting causes webEdition to compare to a session variable from the Customer Management Module. document
This attribute setting causes a comparison with a document variable. In general, a document variable is a field defined via <we:input>.
now This attribute setting enables date comparisons with the current date.
Allowed values:
- global
- request
- sessionfield
- document
- now
property
Default value: - | since version: 2.2.0.0 | required: no
Set this attribute to the property type of a webEdition document that is to be used in a comparison. Valid parameters include: DocType, Category, IsSearchable, Extension, Published, IsDynamic, ParentID, ParentPath, Text, Filename, Path, CreationDate, ModDate, Owners, OwnersReadOnly, CreatorID, ModifierID, RestrictOwners.
Allowed values:
- true
- false
doc
Default value: top | since version: 2.2.0.0 | required: no
Setting this attribute to "self" refers to the current webEdition document. If the document was included via <we:include>, the included document is refered to. Setting this attribute to "top" refers to the document into which the document was included.
Allowed values:
- self
- top
Syntax
<we:conditionAdd field="attribute" [value="attribute"] [compare="=|!=|<|>|<=|>=|like"] [var="attribute"] [type="global|request|sessionfield|document|now"] [property="true|false"] [doc="self|top"] />
Examples
Example
<we:condition name="cond"> <we:setVar from="request" to="global" nameFrom="ort" nameTo="ort"/> <we:conditionAdd field="Venue" var="venue" compare="="/> <we:conditionAnd/> <we:conditionAdd field="weVersion" var="Date" type="now" compare=">"/> </we:condition>