Customizing the Share Header in Alfresco | Code Factory

Reference Link : Link

File : share-header.get.js ( <Alfresco> -> tomcat -> webapps -> share -> WEB-INF -> classes -> alfresco -> site-webscripts -> org -> alfresco -> share -> header )

Removing Menu Items :

if (user.isAdmin)
{
widgetUtils.deleteObjectFromArray(model.jsonModel, 'id', 'HEADER_MY_FILES');
}

This code remove 'My Files' from the header if user is Admin.

Other widgets for removing menus from the header…

widgetUtils.deleteObjectFromArray(model.jsonModel, "id", "HEADER ADMIN CONSOLE");
widgetUtils.deleteObjectFromArray(model.jsonModel, "id", "HEADER_REPOSITORY");
widgetUtils.deleteObjectFromArray(model.jsonModel, "id", "HEADER_PEOPLE");
widgetUtils.deleteObjectFromArray(model.jsonModel, "id", "HEADER_TASKS");
widgetUtils.deleteObjectFromArray(model.jsonModel, "id", "HEADER_SITES_MENU");
widgetUtils.deleteObjectFromArray(model.jsonModel, "id", "HEADER SHARE FILES");
widgetUtils.deleteObjectFromArray(model.jsonModel, "id", "HEADER_HOME");

Before:

After:

Customizing the Sites Drop Down Menu :

// Find the 'Sites' menu
var sitesMenu = widgetUtils.findObject(model.jsonModel, 'id', 'HEADER_SITES_MENU');
if (sitesMenu != null)
{
// Hide the site finder
sitesMenu.config.showSiteFinder = false;
}

This code remove 'Site Finder' option from the 'Sites' menu.

Before:

After:

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store