cancel
Showing results for 
Search instead for 
Did you mean: 

Share Extras - Notice Dashlet Title

cedorfm
Champ in-the-making
Champ in-the-making
Hello,

I am trying to modify the Notice dashlet from Alfresco Share Extras, so that the user is not only able to enter an English title for the dashlet BUT ALSO a French title for the dashlet.

Here is the .ftl file, i'm just not sure what exactly to modify? Any help would be appreciated, thank you.

<script type="text/javascript">//<![CDATA[
   new Alfresco.dashlet.Notice("${args.htmlid}").setOptions(
   {
      "componentId": "${instance.object.id}",
      "title": "<#if args.title?exists>${args.title?js_string}</#if>",
      "text": "<#if args.text?exists>${args.text?js_string}</#if>"
   }).setMessages(
      ${messages}
   );
   new Alfresco.widget.DashletResizer("${args.htmlid}", "${instance.object.id}");
//]]></script>

<div class="dashlet notice-dashlet">
   <div class="title" id="${args.htmlid}-title"><#if args.title?? && args.title != "">${args.title}<#else>${msg("notice.defaultTitle")}</#if></div>
   <#if hasConfigPermission>
   <div class="toolbar">
      <a id="${args.htmlid}-configure-link" class="theme-color-1" title="${msg('link.configure')}" href="">${msg("link.configure")}</a>
   </div>
   </#if>
   <div class="body scrollableList"<#if args.height??> style="height: ${args.height}px;"</#if>>
      <div id="${args.htmlid}-text" class="text-content">
         <#if args.text?? && args.text != "">${args.text}<#else><p>${msg("notice.defaultText")}</p></#if>
      </div>
   </div>
</div>
1 REPLY 1

wabson
Star Contributor
Star Contributor
Hi,

It sounds like you need to do two things. First you need to update the configuration dialogue to allow a French title to be specified as well as an English title. That is easy enough, you just need to modify the webscript FTL that appears under the org/alfresco/modules web script package (any values filled in the form will be automatically stored by Alfresco, so you don't need to worry about that).

The second part would seem to be working out whether to display the English or French title when a user views the dashlet. For that you'd need to modify the FTL code that you posted, but what logic do you propose to use for selecting the language to use?

Cheers,
Will