MMBase Builder Configuration


Table of Contents

1. Introduction
2. Builder XML Format
2.1. <builder>
2.1.1. <status>
2.1.2. <class>
2.1.3. <searchage>
2.1.4. <names>
<singular>
<plural>
<names>
2.1.5. <descriptions>
<description>
<descriptions>
2.1.6. <properties>
<property>
<properties>
2.1.7. <fieldlist>
<field>
<descriptions>
<gui>
<editor>
<db>
A full field example

By installing applications or adding your own builder files you can expand the object types that can be used in MMBase.

Active builders are stored in the builders directory of the MMbase configuration directory. New MMBase installations only contain the core builders. In order to add an object type, you need to add a builder xml, with the name objecttype.xml somewhere in the builders directory.

You can make use of subdirectories to divide your builders in groups for easier maintenance. Note that the MMBase core builders are located under core, and that the applications by default install new builders under applications.

A builder file uses the following general format:

<?xml version="1.0" encoding="UTF-8"?>
<builder 
    xmlns="http://www.mmbase.org/xmlns/builder"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.mmbase.org/xmlns/builder
                        http://www.mmbase.org/xmlns/builder.xsd"
    name="..." maintainer="..." version="..." extends="...">
  <status>...</status>
  <class>...</class>
  <searchage>...</searchage>
  <names>
    <singular xml:lang="...">...</singular>
    ...
    <plural xml:lang="...">...</plural>
    ...
  </names>
  <descriptions>
    <description xml:lang="...">...</description>
    ...
  </descriptions>
  <properties>
    <property name="...">...</property>
    ...
  </properties>
  <fieldlist>
    <field>
      <descriptions>
        <description xml:lang="...">...</description>
        ...
      </descriptions>
      <gui>
        <guiname xml:lang="...">...</guiname>
        ...
      </gui>
      <editor>
        <positions>
          <input>...</input>
          <list>...</list>
          <search>...</search>
        </positions>
      </editor>
      <datatype base="..." xmlns="http://www.mmbase.org/xmlns/datatypes">
         ... (like in datatypes.xml)...
      </datatype>
      <db>
        <name>...</name>
        <type state="..." notnull="..." key="...">...</type>
      </db>
    </field>
    ... 
  </fieldlist>
</builder>
    

Most builders include less information than given here - since they can extend from each other, you only need to supply information that overrides the default, or when you add information such as fields.

The following sections explains the use and intention of each tag in detail.

The builder tag is the main tag. It's attributes define the builder's identity and place in the builder hierarchy. It is the parent of all other tags.



This is part of the MMBase documentation.

For questions and remarks about this documentation mail to: [email protected]