Structures of data that are repeated in many content types, like a set of address fields, or a combobox with a standard set of values, may be defined as mixins and reused in multiple content types. The mixin definition file must be named mixin.xml and placed in the folder cms/mixins/[name]. For example, cms/mixins/us-address/mixin.xml.

  <display-name>U.S. Address format</display-name>
    <form-item-set name="address">
      <occurrences minimum="0" maximum="0"/>
        <input type="TextLine" name="addressLine">
          <occurrences minimum="0" maximum="2"/>
        <input type="TextLine" name="city">
          <occurrences minimum="1" maximum="1"/>
        <input type="TextLine" name="state">
          <occurrences minimum="0" maximum="1"/>
        <input type="TextLine" name="zipCode">
          <label>Zip code</label>
          <occurrences minimum="0" maximum="1"/>

Using a mixin

Below is an example of a simple contenttype that uses the us-address mixin. Notice that the name of the mixin folder is used and not the mixin’s Display Name.

  <display-name>Using mixin: us-address</display-name>
    <field-set name="basic">
        <inline mixin="us-address"/> 
The mixin inputs are included with the inline element and the attribute mixin with the name of the mixin.