[Building Sakai] Proposed minor enhancement: SAK-23567 NeoPortal site title handling

José Mariano Luján jmariano at um.es
Thu May 30 14:32:02 PDT 2013


Hi dev list,
Today, on the CLE Call, we discussed jira SAK-23567 [1] which is a feature request from Univ. of Murcia. The CLE Team thinks that some discussion from the list is needed so, please, consider taking a few minutes to look at it. It would be much appreciated. 

Use case
Our CLE installation features many long site titles, as in, "This is the subject part I", "This is the subject part II".  In each case, truncating the site titles at position X results in site titles that are indistinguishable from one another (e.g., "This is the subj..."). We need greater flexibility than what the current solution provides.

Proposed Solution (patches provided)
We patched 
      portal-impl/impl/src/java/org/sakaiproject/portal/charon/site/PortalSiteHelperImpl.java
      portal-render-engine-impl/pack/src/webapp/vm/neoskin/includeTabs.vm

Note the introduction of 2 new properties

      site.title.cut.method = customize the cut method. Default 100:0. 
      site.title.cut.separator = separator string. Default ... 

We basically use a couple of new properties to choose the way we want to cut the title displayed. The value 'cut.method' has the format X:Y, wich means that X is the percent of maxlength at the beginning and Y is the percent of maxlength at the end. Now, if you choose 50:50 and [...], the above example, will get something like "This is[...]part I" and "This is[...]part II". 

An example of how it could work. Screenshots attached on the jira.

   # Max length for site title display 
   # Default 25 characters 
   #site.title.maxlength=25 

   # Cut method for site title display 
   # Default 100:0 display the first site.title.maxlength characters and the separator string at the end 
   # Other values: 
   # 0:100 display the last site.title.maxlength characters and the separator string at the beginning 
   # 50:50 display first site.title.maxlength*50% characters the separator string and the last site.title.maxlength*50% 
   #site.title.cut.method=100:0 

   # Separator string used to separate characters in cut method 
   # Default ... 
   #site.title.cut.separator= ...  

Proposed fix version
Trunk (2.10), 2.9.3

Feel free to review or comment, your help is much appreciated.

Thanks, Mariano

[1] - https://jira.sakaiproject.org/browse/SAK-23567
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20130530/ba57b0c1/attachment.html 


More information about the sakai-dev mailing list