cancel
Showing results for 
Search instead for 
Did you mean: 

Remove the link from the header

lisandro
Champ in-the-making
Champ in-the-making
I need to remove the link from the header that show the app's credits. Can anybody help me?
9 REPLIES 9

jpotts
World-Class Innovator
World-Class Innovator
The logo image is included as part of the global header. Like all things in Share, this is rendered as a web script. Web scripts are easily overridden. This particular web script is the "header" web script which lives in $TOMCAT_HOME/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/header/. The view that renders the markup lives in header.get.html.ftl. To override the view of this web script, copy that file into $TOMCAT_HOME/webapps/share/WEB-INF/classes/alfresco/web-extension/site-webscripts/org/alfresco/components/header and then edit the file to remove the link.

The best practice would be to include this in a project with a build script that creates an AMP. You can add additional customizations to this project over time.

Jeff

lisandro
Champ in-the-making
Champ in-the-making
@jpotts:
Thanks so much! It works!

kbonnet
Champ in-the-making
Champ in-the-making
I'm doing a similar thing to the navigation component. I want the link to site members to contain the "#showall" parameter, so that by default all site members are shown.

I've copied the directory site-webscripts\org\alfresco\components\navigation from the webapp to web-extension and made the change. I can see my change to be present in /service/index, but it keeps using the ftl from the webapp.

What am i doing wrong?

jpotts
World-Class Innovator
World-Class Innovator
kbonnet,

Not sure, let's double-check your folder structure. You should be able to do what you are trying to do by copying a single file, collaboration-navigation.get.html.ftl into:
$TOMCAT_HOME/webapps/share/WEB-INF/classes/alfresco/web-extension/site-webscripts/org/alfresco/components/navigation

And then modifying that file and restarting Tomcat. I just tried it and it works great for me on 4.0.d Community.

If your file is in the right place, try shutting down and clearing your $TOMCAT_HOME/temp and $TOMCAT_HOME/work/Catalina/localhost directories and restarting.

Jeff

kbonnet
Champ in-the-making
Champ in-the-making
Hi Jeff,

Thanks for your reply. In your example, your moving the copy into the webapp. I would like to have my copy in my extension root; shared/classes/alfresco/web-extensions/site-webscripts/org/alfresco/components/navigation.

This should do the same trick right? But it doesn't for me. I see my copy registered in http://*/share/service/index, but it isnt used.

Koen

hunjet
Champ in-the-making
Champ in-the-making
Hi,

Any news on this issue?

I'm facing the same problem as Koen. If I put my customized navigation component (ftl and js) to $TOMCAT_HOME/webapps/share/WEB-INF/classes/alfresco/web-extension/site-webscripts/org/alfresco/components/navigation folder as suggested by Jeff it works but I want to have all my customizations in JAR file for easy deployment.

Inside jar file, customized files for navigation component are located at "alfresco/site-webscripts/org/alfresco/components/navigation". Currently I'm using 4.1.a Community.

Thanks,
Blaž

jpotts
World-Class Innovator
World-Class Innovator
kbonnet & hunjet,

Here are the places you can put collaboration-navigation.get.html.ftl and it will work:

In the exploded Share web application, under web-extension:
$TOMCAT_HOME/webapps/share/WEB-INF/classes/alfresco/web-extension/site-webscripts/org/alfresco/components/navigation

In shared classes under web-extension:
$TOMCAT_HOME/shared/classes/alfresco/web-extension/site-webscripts/org/alfresco/components/navigation

In a JAR under:
alfresco/site-webscripts/org/alfresco/components/navigation/collaboration-navigation.get.html.ftl

With the JAR living in either $TOMCAT_HOME/shared/lib or $TOMCAT_HOME/webapps/share/WEB-INF/lib.

I have tested all three of these scenarios against Alfresco 4.0.d Community and it works.

Jeff

hunjet
Champ in-the-making
Champ in-the-making
Thanks Jeff,

In the meantime I resolved my problem by putting collaboration-navigation.get.html.ftl in a JAR under:
alfresco/web-extension/site-webscripts/org/alfresco/components/navigation/collaboration-navigation.get.html.ftl

Blaž

chrisokelly
Champ on-the-rise
Champ on-the-rise
Hi Jeff,

Blaž referred me to this fix from another topic. I thanked him in that topic but just wanted to come here and thank you very much also, this helps me with so many of the extensions/overrides I have tried and failed to deploy!