- 3.8. OPT attributes
3.8.7. opt:on - 3.8.6. opt:if
« Previous - 3.8.8. opt:section
Next »
3.8.7. opt:on
The attribute allows to display a tag conditionally, but with keeping the content.
<p><a parse:href="$user.www" opt:on="isAddress($user.www)">{$user.nick}</a></p>
If the $user.www is a valid URL, we will see:
<p><a href="http://www.example.com/">Nickname</a></p>
And if not:
<p>Nickname</p>
Note that such code has no effect when using with instruction tags.
See also:
- 3.8.7. opt:on
3.8. OPT attributes - « Previous
3.8.6. opt:if - Next »
3.8.8. opt:section