ClassCondition

An article by Gaspard Bucher

conditional execution depending on a class, virtual class or role

  1. action
  2. ajax
  3. API
  4. classes
  5. common attributes
  6. conditions
    1. blank?
    2. case
    3. ClassCondition
    4. else
    5. if
    6. is_ancestor?
    7. selenium
    8. when
  7. context
  8. dates
  9. display
  10. forms
  11. i18n
  12. meta
  13. SQLiss
  14. urls

conditional execution depending on a class, virtual class or role

see if, zena 1.0

This is a meta tag because it matches all methods starting with a capital letter.

The role of this tag is to filter execution depending on the runtime type. For example the following code will only execute on Images:

<r:Image?>I am an image!</r:Image?>

Virtual class

You can also filter by virtual classes:

<div do='Post?'>posted in <r:parent do='link'/></div>

Role

And finally, you can filter by role.

Reminder: a node “has a role” if it has non-blank properties defined in the given role.

<r:Task?>
  this node has the "Task" role. It is assigned to <b do='assigned'/>
</r:Task?>