Hello
I've been following Pavel Makhov's tutorial on how to customize alfresco footer but it doesn't work. I'm on Alfresco 6.1.1.
I copied faceted-search.get.js into
/my-project-share/src/main/resources/alfresco/web-extension/site-webscripts/com/project/pages/faceted-search/
footer folder with css, i18n, templates and MyFooter.js are in the
/my-project-share/src/main/resources/META-INF/resources/my-project-share/js/mycmpny/
In the my-extension.xml I have:
<package name="mycmpny" location="resources/my-project-share/js/mycmpny"/>
And in the end of the faceted-search.get.js I pasted:
var footer = widgetUtils.findObject(model.jsonModel, "id", "ALF_SHARE_FOOTER"); footer.config.widgetsForFooter = [{ name: "mycmpny/footer/MyFooter", config: { semanticWrapper: "footer", currentYear: new Date().getFullYear(), snowLabel: "label.snow" } }];
(I changed ALF_STICKY_FOOTER to ALF_SHARE_FOOTER )
What may be wrong? I have no logs, no errors, the old footer is still displayed.
Solved! Go to Solution.
That is my my-extension.xml
<extension> <modules> <module> <id>My custom widgets</id> <version>1.0</version> <auto-deploy>true</auto-deploy> <configurations> <config evaluator="string-compare" condition="WebFramework" replace="false"> <web-framework> <dojo-pages> <packages> <package name="mycmpny" location="resources/my-project-share/js/mycmpny"/> </packages> </dojo-pages> </web-framework> </config> </configurations> </module> </modules> </extension>
I did just like Mr. Pavel Makhov did.
EDIT. I figured it out! Than you so much @afaust.
I had to add additional module inmy-extension.xml
<module> <id>Extension Module Footer</id> <auto-deploy>true</auto-deploy> <evaluator type="default.extensibility.evaluator"/> <customizations> <customization> <targetPackageRoot>org.alfresco.share.pages.faceted-search</targetPackageRoot> <sourcePackageRoot>com/project/pages/faceted-search</sourcePackageRoot>
</customization>
</customizations>
</module>
Also very helpful was the functionality which ables you to download generated extension JAR. I really appreciate the guy who did it!
Now i'm just wondering why Pavel Makhov in his tutorial didn't do it. Didn't the previous Alfresco version require it?
You are likely missing the <customization> configuration in your extension XML to map your com.project.pages.faceted-search package to the proper Alfresco package so that faceted-search.get.js is actually called as a post-processor to the original web script.
That is my my-extension.xml
<extension> <modules> <module> <id>My custom widgets</id> <version>1.0</version> <auto-deploy>true</auto-deploy> <configurations> <config evaluator="string-compare" condition="WebFramework" replace="false"> <web-framework> <dojo-pages> <packages> <package name="mycmpny" location="resources/my-project-share/js/mycmpny"/> </packages> </dojo-pages> </web-framework> </config> </configurations> </module> </modules> </extension>
I did just like Mr. Pavel Makhov did.
EDIT. I figured it out! Than you so much @afaust.
I had to add additional module inmy-extension.xml
<module> <id>Extension Module Footer</id> <auto-deploy>true</auto-deploy> <evaluator type="default.extensibility.evaluator"/> <customizations> <customization> <targetPackageRoot>org.alfresco.share.pages.faceted-search</targetPackageRoot> <sourcePackageRoot>com/project/pages/faceted-search</sourcePackageRoot>
</customization>
</customizations>
</module>
Also very helpful was the functionality which ables you to download generated extension JAR. I really appreciate the guy who did it!
Now i'm just wondering why Pavel Makhov in his tutorial didn't do it. Didn't the previous Alfresco version require it?
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.