Modifying Out-of-the-Box Aikau Pages - Alfresco Content Services - 23.4 - 23.4 - Ready - Alfresco - external

Alfresco Content Services

Platform
Alfresco
Product
Alfresco Content Services
Release
23.4
License

The Share web application has a number of Aikau pages. These can be modified.

The preferred way of modifying Aikau pages is by using Surf Extension Modules to target the Aikau widget that should be replaced or hidden. For more information on Aikau pages, see Aikau Pages. It is also possible to add widgets to a page this way. The Extension Modules section has all the details. Now, if we want to modify an existing page we need to grab hold of it in the Web Script controller, this will look like this:

var widget = widgetUtils.findObject(model.jsonModel.widgets, "id", "FCTSRCH_SEARCH_RESULTS_LIST");
if (widget && widget.config && widget.config.widgets) {
   widget.config.widgets.push( {
...   

This is all that is required to extend an existing JSON model. We’re using widgetUtils to find the FCTSRCH_SEARCH_RESULTS_LIST widget. Once we have it, we simply push widgets into it.