Adding a Custom Column to the Websites (siteadmin) Console

The Websites Administration console can be extended to display custom columns. The console is built based on a JSON object that can be extended by creating an OSGI service implementing the ListInfoProvider interface. Such a service modifies the JSON object that is sent to the client to build the console.

This step-by-step tutorial explains how to display a new column in the Websites Administration console by implementing the ListInfoProvider interface. It consists of the following steps:

Your implementation should decide, based on the provided request and/or resource, whether it should add the information to the JSON object or not.

If your ListInfoProvider implementation defines a property that already exists in the response object, its value will be overwritten by the one you provide.
You can use service ranking to manage the execution order of multiple ListInfoProvider implementations.

Testing the New Service

When you open the Websites Administration console and browse through your site, the browser is issuing an ajax call to get the JSON object that is used to build the console. For example, when you browse to the /content/geometrixx folder, the following request is sent to the AEM server to build the console:

Displaying the New Column

The last step consists in adapting the nodes structure of the Websites Administration console to display the new property for all the Geometrixx pages by overlaying /libs/wcm/core/content/siteadmin. Proceed as follows:

In CRXDE Lite, create the nodes structure /apps/wcm/core/content with nodes of type sling:Folder to reflect the structure /libs/wcm/core/content.

Copy the node /libs/wcm/core/content/siteadmin and paste it below /apps/wcm/core/content.

Copy the node /apps/wcm/core/content/siteadmin/grid/assets to /apps/wcm/core/content/siteadmin/grid/geometrixx and changes its properties:

Remove pageText

Set pathRegex to /content/geometrixx(/.*)?
This will make the grid configuration active for all geometrixx websites.

Set storeProxySuffix to .pages.json

Edit the storeReaderFields multivalued property and add the starred value.

To activate MSM functionality add the following MSM parameters to the multi-String property storeReaderFields:

msm:isSource

msm:isInBlueprint

msm:isLiveCopy

Add a starred node (of type nt:unstructured) below /apps/wcm/core/content/siteadmin/grid/geometrixx/columns with the following properties:

dataIndex: starred of type String

header: Starred of type String

xtype: gridcolumn of type String

(optional) Drop the columns you do not want to display at /apps/wcm/core/content/siteadmin/grid/geometrixx/columns

/siteadmin is a vanity path that, as default, points to /libs/wcm/core/content/siteadmin.
To redirect this to your version of siteadmin on /apps/wcm/core/content/siteadmin define the property sling:vanityOrder to have a value higher than that defined on /libs/wcm/core/content/siteadmin. The default value is 300, so anything higher is suitable.

The new column called Starred is available, displaying custom information as follows:

Attention :

If multiple grid configurations match the requested path defined by the pathRegex property, the first one will be used, and not the most specific one, which means that the order of the configurations is important.