How to replace the faceted-search form's footer for a custom one?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2015 09:16 PM
My next requirement is to replace the footer for a custom one, with a custom logo, and without any of the licence text information.
I tried to create a custom widget and replace it as follow:
var pageTitleWidget = widgetUtils.findObject(model.jsonModel.widgets, "id", "HEADER_TITLE");var footerWidget = widgetUtils.findObject(model.jsonModel.widgets, "id", "ALF_STICKY_FOOTER");if(pageTitleWidget != null){ pageTitleWidget.config.browserTitlePrefix = msg.get("faceted.search.page.custom.title.prefix");}if(footerWidget != null){ footerWidget.config.widgetsForFooter = [ { name: "custom/widgets/footer/CustomFooter", config: { semanticWrapper: "footer", logoImageSrc: "custom-logo.png" } } ]}
Is it possible?
Can someone please provide some sample code on this?
Thank you in advance.
- Labels:
-
Archive
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2015 04:55 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2017 07:48 AM
Hi Douglas,
I am trying to customise the search page footer using Pavel Makhov and it doesn't seems to be working for me.
Any help would be appreciated.
Thanks
Hiten Rastogi

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2018 03:30 PM
Hi,
Try with ALF_SHARE_FOOTER instead of ALF_STICKY_FOOTER
(see site-webscripts\org\alfresco\share\imports\share-footer.lib.js)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2018 05:47 AM
Thanks guisup,
I was able to do it by overriding the share-footer.llib.js and commenting out part of code not relevant to me.
NOTE - In SDK 3 you have to put the above file under src/main/assembly/web/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/share/imports/share-footer.lib.js

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2018 03:27 PM
Hi Hiten,
Sorry, my answer was not precise enough.
Instead of overriding the native code you can use an extension like :
<extension> <modules> <module> <id>Hide Footer in faceted search page</id> <auto-deploy>true</auto-deploy> <version>1.0</version> <evaluator type="default.extensibility.evaluator" /> <customizations> <customization> <targetPackageRoot>org.alfresco.share.pages.faceted-search</targetPackageRoot> <sourcePackageRoot>custom.share.pages.faceted-search</sourcePackageRoot> </customization> </customizations> </module> </modules></extension>
and in SDK3:
META-INF\resources\alfresco\web-extension\site-webscripts\custom\share\pages\faceted-search\faceted-search.get.js
function findAndRemoveIn(obj, arrContext, arrIdx, id) { var idx, max, key; if (obj !== undefined && obj !== null) { if (Object.prototype.toString.apply(obj) === "[object Object]") { if (obj.hasOwnProperty("id") && obj.id === id) { if (arrContext !== null && arrIdx !== null) { arrContext.splice(arrIdx, 1); } else { logger.debug("Unexpected match outside of array structure: " + jsonUtils.toJSONString(obj)); } } else { for (key in obj) { if (obj.hasOwnProperty(key)) { findAndRemoveIn(obj[key], null, null, id); } } } } else if (Object.prototype.toString.apply(obj) === "[object Array]") { for (idx = 0, max = obj.length; idx < max; idx++) { findAndRemoveIn(obj[idx], obj, idx, id); } } }}findAndRemoveIn(model.jsonModel.widgets, null, null, "ALF_SHARE_FOOTER");
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2018 01:19 AM
Hi guisup,
I did understood what you meant . As a rule of thumb for any customisation in Alfresco I always first try with the Alfresco share extension mechanism and if I am not able to succeed then I go for overriding mechanism.
As I said in my above comments I had done this via overriding for now as I was not able to properly do it the way you suggested.
I would definitely give it a try.
Thanks
