cancel
Showing results for 
Search instead for 
Did you mean: 

Customizing Browser Header

tbarg
Champ in-the-making
Champ in-the-making
Hello,

I want to change the browser header to display something more useful.
message original: Alfreso Share >> Collaboration Site Dashboad

by modifing slingshot.properties I came as far as
message now: Company_Name >> Collaboration Site Dashboard

but I also want it to display the name of the site, like this:
message goal: Company_Name >> Alfresco_Site_Name >> Dashboard

is this possible?
what would I have to do?
2 REPLIES 2

afaust
Legendary Innovator
Legendary Innovator
Hello,

in order to display the title of the current site in the header you would have to adapt the general page template FTL of Alfresco Share (alfresco-template.ftl). In it you could check wether the site ID is available in the request URL and include it in the title. If you want to resolve it to the actual site title, you would need to include the remote resolution call in the page JavaScript controller to pass it on to the page template (which in turn includes the general page template).

Regards
Axel

tbarg
Champ in-the-making
Champ in-the-making
I did it  Smiley Very Happy

modified the alfresco-template.ftl to include the following:


<#if page.url.templateArgs.site??>
<#assign pageTitle = page.url.templateArgs.site>
<#assign userDashboard = "false">
<#else>
<#assign pageTitle = page.title>
<#assign userDashboard = "true">
</#if>

<#if userDashboard = "false">
   <#assign temp = pageTitle>

   <#if page.titleId??>
      <#assign pageTitle = temp+" &raquo; "+(msg(page.titleId))!page.title>
   </#if>
   <#if context.properties["page-titleId"]??>
      <#assign pageTitle = temp+" &raquo; "+msg(context.properties["page-titleId"])>
   </#if>
</#if>

Additionally:
in slingshot.properties:
page.title = company

now my browser header shows:
Company_Name >> Alfresco_Site_Name >> Dashboard

I added the boolean UserDashboard to prevent something like Company_Name >> UserDashboard >> Dashboard

THANKS