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. However, sites have the unique ability to let you add applications to them.
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:
<site> <form/> </site>
<site> <processors> (1) <response-processor name="tracker" order="10"/> (1) (2) </processors> <mappings> (2) <mapping controller="/site/foobar/api.js" order="10"> <pattern>/api/v\d+/.*</pattern> </mapping> <mapping controller="/site/pages/default/default.js"> <match>type:'portal:fragment'</match> </mapping> </mappings> <form> (3) <input type="TextLine" name="company"> <label>Company</label> <occurrences minimum="1" maximum="1"/> </input> <mixin name="address"/> </form> <x-data name="seo-settings"/> (4) </site>