07-11-2015 09:16 PM
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"
}
}
]
}
08-19-2015 04:55 AM
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
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)
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
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");
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
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.