4.2. and
4.2.1. Summary
Parameters: type term op compare
Pass attribute hash as last to subroutine: no
Must pass named parameter interpolate=1 to cause interpolation.
Invalidates cache: no
Note: This tag has special positional parameter handling.
[and type term op compare]
| Parameters | Description | Default |
| base | Alias for type | DEFAULT_VALUE |
| comp | Alias for compare | DEFAULT_VALUE |
| compare | DEFAULT_VALUE | |
| op | DEFAULT_VALUE | |
| operator | Alias for op | DEFAULT_VALUE |
| term | DEFAULT_VALUE | |
| type | DEFAULT_VALUE |
| Attributes | Default |
| interpolate (reparse) | No |
| Other_Charactreristics | |
| Invalidates cache | no |
| Container tag | No |
| Has Subtags | No |
| Nests | Yes |
Tag expansion example:
[value name=fname set="Mike" hide=1]
[value name=lname set="" hide=1]
...
[if value fname]
[and value lname]
Both first and last name are present.
[else]
Missing one of "fname" and "lname" from $Values.
[/else]
[/if]
---
Missing one of "fname" and "lname" from $Values.
ASP-like Perl call:
Not applicable. The [and ...] tag only is used with [if ...], and Perl logic obviates the [if ...] tag.
4.2.2. Description
The [and ...] tag is only used in conjunction with [if ...]. Example:
[if value fname]
[and value lname]
Both first and last name are present.
[else]
Missing one of "fname" and "lname" from $Values.
[/else]
[/if]
See [if ...].