cancel
Showing results for 
Search instead for 
Did you mean: 

share-header - changing the value of Sites and Tasks

bengrah
Champ on-the-rise
Champ on-the-rise
Hi there,

I've been following the Alfresco blog on how to make customisations (link: https://www.alfresco.com/blogs/developer/2013/09/16/customizing-the-share-header-part-3/) that has worked for removing certain share-header menu items that I don't need, and for renaming certain share-header strings as well. So for example, I've changed the string 'Repository' to 'Shared Folders' as that fits our business need.

This works with no issue. However, in the same properties file I've changed the value of 'Sites' to 'Projects', but this value has not changed.

I've got everything working correctly, I've got file called mh-header-extension.xml in alfresco/site-data/extensions:


<extension>
  <modules>
    <module>
      <id>MH menu</id>
      <version>1.5</version>
      <customizations>
        <customization>
          <targetPackageRoot>org.alfresco.share.header</targetPackageRoot>
          <sourcePackageRoot>mh.share-header</sourcePackageRoot>
        </customization>
      </customizations>
    </module>
  </modules>
</extension>


I've got a webscripts directory in <i>alfresco/site-webscripts/mh/share-header</i> which matches my xml config. In this area I've got <i>share-header.get.js</i> which contains the following:


widgetUtils.deleteObjectFromArray(model.jsonModel, "id", "HEADER_MY_FILES");
widgetUtils.deleteObjectFromArray(model.jsonModel, "id", "HEADER_SHARED_FILES");
widgetUtils.deleteObjectFromArray(model.jsonModel, "id", "HEADER_TASKS");


And in the same <i>share-header</i> folder, I've got another file <i>share-header.get_en.properties</i> which contains the following text changes:


user.dashboard={0} Dashboard

header.menu.home.label=Home
header.menu.sites.label=Projects
header.menu.people.label=MGuide
header.menu.repository.label=Shared Folders
header.menu.admin.label=Admin Tools
header.menu.admin.sites.label=Project Manager
header.menu.mytasks.label=My Tasks
header.menu.myworkflows.label=Workflows I've Started

page.navigation.more.label=More

header.menu.invite.altText=Invite users
header.menu.siteConfig.altText=Project configuration options

edit_site_details.label=Edit Project Details
customize_dashboard.label=Customize Dashboard
customize_site.label=Customize Project
leave_site.label=Leave Project
join_site.label=Join Project
join_site_moderated.label=Request to Join
become_site_manager.label=Become Project Manager

set_status.label=Set Status
my_profile.label=My Profile
change_password.label=Change Password
help.label=Help
logout.label=Logout

header.advanced=Go to Advanced Search
header.backlink=Back to {0} Project
header.results=Back to Results


I jar up the folders from the <i>alfresco</i> level and add to <i>webapps/share/WEB-INF/lib</i>, restart Share and redeploy the module via http://localhost:8180/share/page/modules/deploy, then refresh my Share webpage, I can see the share-header strings change, 'Repository' becomes 'Shared Folders' etc. But 'Sites' does not change to 'Projects'

Can someone help me understand why that's that is the case?

Ben.


4 REPLIES 4

midoscofield
Champ in-the-making
Champ in-the-making
You have to also modify the file share-header.get.properties with the same thing as share-header.get_en.properties

Thanks for replying midoscofield, I tried that; I added the <em>share-header.get.properties</em> file to <em>alfresco/site-webscripts/mh/share-header</em>, I modified all the properties that I wanted, in this case, again changing 'Sites' to 'Projects. I jar up the <em>alfresco</em> and copy it to <em>share/WEB-INF/lib</em> and restart Share. But the value of Sites still does not change to Projects.

Ben.

bengrah
Champ on-the-rise
Champ on-the-rise
Anyone else got any guidance on this?

hardik1512
Star Contributor
Star Contributor
Try changing share-header.lib_en.properties file.