create and customise your own CMS

Composum Pages is providing a CMS framework on top of the powerful Apache Sling framework to create your own Content Management System. The CMS implementation is driven by components which are the placeable pieces of a content page. Pages are also implemented as components and provided as preconfigured page templates. A page is referencing client libraries (clientlibs) which are containing the component styles and the necessary client code (Javascript).

For the component development the Composum Pages edit frame can be used in the 'develop' mode. A developer can switch to this mode using the 'logo tools menu' in the left corner or by requesting the edit frame with the additional URL parameter pages.mode=develop

See also:


Composum Pages components are Sling components which ere rendered by the Apache Sling scripting services. A Pages Component consists of

  • a set of rendering scripts (JSP, HTL, ...) which are using Java models (Sling or Pages models or other Java objects) to access the repository resources and generate the HTML markup
  • a component structure description for the generic tools of the Pages edit frame
  • a dialog component to edit the components properties
  • a set of action declarations for the various contexts in the Composum Pages edit frame
  • a component help content page which describes the components features

A set of useful components to start quickly is delivered with the Pages Components module. The examples below are references to these components.

Component Declaration

In Apache Sling everything is a resource; a component also. A components resource describes the components type and declares a resource type (the path in the repository). The components resource describes also the property and element structure of the component:

The necessary property of such a component declaration are:

  • jcr:primaryType
    must be 'cpp:Component' if you want to select this component type for insertion in a container otherwise 'sling:Folder' or 'nt:unstructured' are possible also
  • componentType or sling:resourceSuperType
    a component must declare its general Type - Element, Container or Page; if a resource super type is specified this type declaration is inherited
  • category (multi)
    the set of categories to present the component type in the designated group of the Pages edit frame tools
  • jcr:title and jcr:description
    useful to find the component in the component selection tools

The jcr:content subnode of the component declaration resource contains the component structure describing meta data of the component - the set of properties and the set of embedded elements. This meta data are used by generic editing tools such as the content comparator to use the instances of the content component.


Edit Dialogs

Edit dialogs are 'subcomponents' of a content component. They are placed at the edit/dialog path of the content component and they are itself also a Sling component (not of type 'cpp:Component' !). Such a dialog can be derived from a dialog super type, e.g. from a dialog component of the components super type. The dialog template is a JSP script which is using the edit widget JSP tags of theComposum Pages taglib to render the HTML markup edit dialog.

Edit Actions & Tile

Context Tools and the Help Page

Pages and Templates

Page Components

A content page is also rendered by a Sling component. Such a component must be of component type cpp:Page.

A page is declaring a set of elements and containers to construct the page content. These elements are arranged by the pages rendering scripts and normally static included. This and all the other aspects of a page component are similar to a content component.

A page components must render a complete HTML page including the 'head' and 'body'. To support the page editing for these both elements a JSP tag is available - see the base page 'main' script of the Pages Components:

The base page implementation in the Pages Components is using a lot of scripts for the various aspects of a page to support changing of this aspects selective by base page subtypes.

Page Templates

A new page is created by applying a predefined page template.

The page  templates are declaring the component type of the page and their initial content structure. They specify also the structure policies of the page.

Each content page in the resource resolvers search path is a page template (if not marked with isTemplate=false). The known Sling overlay mechanism is also effective here - a template in the '/apps' folder hides the template at the same path in the '/libs' folder.

Client Libraries