The project structure is similar to Maven. Create the folder structure you
see below. All are folders except for
my-first-module/ build.gradle src/ main/ resources/ module.xml cms/ lib/ pages/ parts/ layouts/ view/ assets/ content-types/ mixins/ relationship-types/ services/
Every file and folder has a specific function and meaning.
- Gradle script for building the module. This file describes the actual build process.
module.xmlfile contains basic information to register the module in Enonic XP. Settings for the module can be defined in the
configelement and the values for these settings can be updated in the administration console. An example will be presented later in this document. Leave the
configelement blank for now.
<module> <config/> </module>
- This is the last place the global
- Page definitions should be placed here. They will be used to create page templates in the repository.
- Part definitions should be placed here. Parts are objects that can be placed on a page.
- Layout definitions should be placed here. Layouts are definitions that restricts the placement of parts.
- Views can generally be placed anywhere you want, just keep in mind what path to use when resolving them.
- Content schemas-types are placed here. Used to create structured content.
- Mixin schema-types are placed here. A mixin can be used to add fields to a content-type.
- Relationship-types are placed here. They are used to form relations between contents.