AnsweredAssumed Answered

Customizing document/page title

Question asked by cybertoast on Dec 21, 2009
Latest reply on Dec 23, 2009 by gronfelt
I want to set the document.title (browser title) of the site and document that I'm on to be more relevant. Right now the title says Alfresco Share >> Document Library (or something similar).
I'm currently setting the title by changing import/alfresco-template.ftl as follows:

<#– Look up page title from message bundles where possible –>
<#assign pageTitle = page.title />
<#if page.titleId??>
   <#assign pageTitle = (msg(page.titleId))!page.title>
</#if>
<#if context.properties["page-titleId"]??>
   <#assign pageTitle = msg(context.properties["page-titleId"])>
</#if>
<#if page.url.templateArgs.site??>
  <#assign pageTitle = page.url.templateArgs.site + " &laquo; " + pageTitle>
</#if>

Is this the correct way to make these changes or is the a more recommended approach? Also is there documentation somewhere on what variables alfresco makes available in freemarker templates (like the page object, for example)?

Outcomes