list

toc
<mm:list> Returns a list of (cluster) nodes. Starting at one or more nodes traversals are made according to a specified path of node managers. One traversal makes up one record returned by the list. All possible traversals that can be made starting at one or more nodes of the same type and following a specified path are returned. Additional attributes can be used to exclude records from the returned list or to influence the order of the returned list. Because the returned records can contain more than one node (such a record that contains fields from several `nodes' is referred to as a `clusternode') you will have to prefix the field name with the node manager name and a dot if you want to refer to them.
see alsolistnodes | listcontainer | element attribute of node
attributes
  • nodes
    Comma-separated list of node numbers that should be used as start nodes. The start nodes don't have to be a member of the first node manager in the path. For example, if the start nodes belong to the second node manager in a path with a length of three node managers, traversals will go into two directions at the same time. All traversals that make up a complete path are returned. If a node belongs to the last node manager in a path traversals will go from right to left starting at the last node manager. All start nodes specified in this attribute have to belong to the same node manager. Nodes that belong to a different node manager than the first node are ignored In case this attribute is not specified all nodes from the first node manager in the path are used as start nodes.
  • path ( `path' or `referid' is mandatory. )
    A comma-separated list of node managers which specifies the path that should be followed. It is possible to explicitly specify a relation manager that should be used to go from one node to an other. If no relation manager is specified between two node managers, all possible relation managers that can be used to go to the next specified node in the path are followed. It is possible to add a digit (0-9) to the node manager name and refer to this node manager with his name and this digit appended. This can be useful if a node manager is used more than once in a path.
    mags
    mags,news
    mags,related,news
    mags,news,images
    mags,related,news,related,images
    pools,pools0,urls
    pools1,pools2,urls,pools3
  • fields
    Comma-separated list of fields that should be made available in the page. The fields are selected from attributes of the corresponding node managers defined in type. It is required to append a prefix to each field listed e.g. fields="mags.title,news.title".
  • constraints
    Constraints to prevent records from being included in the returned list. These constraints follow the syntax of the SQL where clause. It's a good practice to use uppercase letters for the operators and lowercase letters for the field names. There are also a (new) `constraint' tags, which are more flexible (especially when constructing the constraints automatically).
    see: constraint
    url.number = 100!=, <, >, <= and >= can also be used
    person.name = `admin'
    person.email IS NULLindicating the email field should be empty
    person.email LIKE `%.org'indication the email should end with .org
    url.number BETWEEN 30 AND 50
    person.name IN ('admin', `anonymous')
    NOT (url.number = 100)
    person.email IS NOT NULLindicating the email field should not be empty
    person.email NOT LIKE `%.org'indication the email should not end with .org
    url.number NOT BETWEEN 30 AND 50
    person.name NOT IN ('admin', `anonymous')
    LOWER(user.name) = `admin'this will also allow `Admin' to be returned
    LENGTH(user.name) > 5 this will only allow name with a length greater than 5 to be returned
    ((number=100) OR (name='admin') AND email LIKE `%.org')Linking constraints together using AND and OR
    name='aaa''bbb' To only retrieve the string aaa'bbb. A single quote can be escaped using it twice for every single occurrence.
  • orderby
    A comma-separated list of field names on which the returned list should be sorted.
  • directions
    A comma-separated list of values indicating whether to sort up (ascending) or down (descending) on the corresponding field in the orderby parameter or null if sorting on all fields should be up. The value DOWN (case insensitive) indicates that sorting on the corresponding field should be down, all other values (including the empty value) indicate that sorting on the corresponding field should be up. If the number of values found in this parameter are less than the number of fields in the orderby parameter, all fields that don't have a corresponding direction value are sorted according to the last specified direction value.
    UP
    DOWN
    UP,DOWN,UP
  • distinct
    If set to `true' or `yes' all records who have exactly the same values will not be added a second time to the returned list.
  • max
    The maximum number of records to return. Can do it also with the maxnumber tag in the container.
    see: maxnumber
  • offset
    The first number of records to skip. Can do it also with the `offset' tag in the container
    see: offset
  • searchdir
    Determines how directionality affects the search. If set to "destination" relations in a path will only be followed if valid relation exist from source to destination. If set to "source" relations in a path will only be followed if valid relations exist from destination to source. To follow all relations ignoring their directionality set this attribute to "all". Any other value for this attribute will follow relations the way they are defined (either source to destination, destination to source or both).
clusternodeprovider attributes
nodeprovider attributes
listprovider attributes
contextreader attributes
contextwriter attributes
contextreferrer attributes
cloudreferrer attributes
querycontainerreferrer attributes
containerreferrer attributes
example 1
<mm:list nodes="123" path="mags,news"
                fields="mags.title,news.number">
  <mm:first>magazine list</mm:first>
  <mm:field name="mags.title" />
</mm:list>
example 2
<mm:list nodes="123" path="mags,posrel,news"
                orderby="posrel.pos" fields="news.title">
  <mm:first>news in this magazine, ordered</mm:first>
  <mm:field name="news.title" />
</mm:list>
example 3
<mm:list path="pools,pools0,urls"
                fields="pools.name,pools0.name,urls.url">
  <mm:field name="pools.name" />
  <mm:field name="pools0.name" />
  <mm:field name="urls.url" />
</mm:list>