ageconstraint

toc
<mm:ageconstraint>

In MMBase, objects on default do not have a `creation time' field. But the `number' field can be used to estimate the age (in days), because for every day a `day mark' is remembered. This tag gives easy access to this functionality.

Note that in MMBase 1.8 it is possible to define creation and lastmodified time fields of DATETIME database type. Age-constraints can then also be accomplished by constraints on the date parts of such a field.

(since: MMBase-1.7)
see alsolistnodescontainer | listcontainer | part attribute of constraint
attributes
  • element (since: MMBase-1.8)
    If the surrounding nodelist container is a list container then the constraint can be on the several elements from the path. With this attribute you must indicate to which. This is not needed for listnodes and relatednodes containers.
    see: listcontainer | listnodescontainer
  • field
    If the surrounding nodelist container is a list container then the constraint can be on the several elements from the path. With this attribute you must indicate to which. This is not needed for listnodes and relatednodes containers (and probably would be a `number' field otherwise). This attribute is deprecated in favour of 'element'.
    see: element attribute of ageconstraint | listcontainer | listnodescontainer
  • minage (since: MMBase-1.7)
    Minimal age of the object in days.
  • maxage
    Maximal age of the object in days.
  • inverse
    Inverses the constraint. So adds a NOT.
querycontainerreferrer attributes
containerreferrer attributes
example 1
<mm:listnodescontainer type="typedef">
  <mm:ageconstraint maxage="100" />
  <mm:listnodes>
    <mm:field name="name" />
  </mm:listnodes>
</mm:listnodescontainer>