A highly central component of the XP CMS are sites. Site is shipped as a standard content type, which means it can easily be created and added by editors. Sites can also have applications assigned to them. Site applications are isolated from project applications. If a site should use an application already assigned to its project, you must assign the application directly to the site.

Whenever an app is added to a site, all functionality and all content types from the app will be available within the scope of the site.

Only applications that declare support for sites can be added. This is done via the descriptor file called site.xml


The site form serves multiple purposes:

  • Declares that this app supports sites

  • Lets you to configure the application on a per site basis

  • Defines X-data mappings for the site

  • Defines bindings to Controllers as mappings and filters

The descriptor must be placed in your project as: src/main/resources/site/site.xml

Minimal site.xml example
Site.xml with all options enabled
  <processors>  (1)
    <response-processor name="tracker" order="10"/> (1) (2)
  <mappings>  (2)
     <mapping controller="/site/foobar/api.js" order="10">
     <mapping controller="/site/pages/default/default.js">
   <x-data name="seo-settings"/>  (3)
   <form>  (4)
    <input type="TextLine" name="company">
      <occurrences minimum="1" maximum="1"/>
    <mixin name="address"/>
1 Commonly used to add page contributions to the response
2 Controller and filter mappings definitions
3 Specify X-data fields to add across content types within the site
4 Define a form for this app. Used to add site specific configuration of the app