09-01-2017 11:30 AM
How do I bring the search box from "SHARE_HEADER" to right side of the "HEADER_TITLE_BAR". Please refer the below image.
09-04-2017 05:28 AM
09-07-2017 06:43 AM
Hi,
I would suggest you to create a share-extension module.
Follow these steps.
1. Create custom-header-extension.xml file at web-extension->site-data->extensions folder with the following content
<extension>
<modules>
<module>
<id>Custom Share Header Menu</id>
<version>1.0</version>
<customizations>
<customization>
<targetPackageRoot>org.alfresco.share.header</targetPackageRoot>
<sourcePackageRoot>admin-header</sourcePackageRoot>
</customization>
</customizations>
</module>
</modules>
</extension>
2. Create the admin-header folder inside site-webscripts
3. Create share-header.get.js inside admin-header with the following code
- This will remove search option from main menu
widgetUtils.deleteObjectFromArray(model.jsonModel, "id", "HEADER_SEARCH");
- and the following code will add it to title-bar.
var headerMenu = widgetUtils.findObject(model.jsonModel, "id", "HEADER_TITLE_BAR");
if (headerMenu != null) {
headerMenu.config.widgets.push({
id: "HEADER_SEARCH",
name: "alfresco/header/SearchBox",
align: "right",
config: {
id: "HEADER_SEARCH_BOX",
site: page.url.templateArgs.site,
siteName: "mySite",
enableContextLiveSearch: true,
linkToFacetedSearch: true,
sitePage: ""
}
});
}
Feel free to ask in case of any query.
Thanks
Kalpesh
Explore our Alfresco products with the links below. Use labels to filter content by product module.