[Building Sakai] Need help setting a tool title in 2.6

Seth Theriault slt at columbia.edu
Mon Jan 10 06:49:49 PST 2011


Steve Swinsburg wrote:

> Is there a chance this is related somehow to tool/page 
> localisation work? The same thing happens when trying to set 
> the title of the Home page using a web service call so it 
> sounds like it is further down the stack.

I am not sure, but I should probably clarify a bit. The title in 
question is the one the "Site Information Display" title on the 
sakai.iframe.site tool on the Home page.

Since time is of the essence, I implemented a workaround: using 
a template without a "Home" tool and then adding a Home page 
with the correct tool title programatically to th site:

  // Add Home and tool with correct title and position to site
  LOG.debug("Manually adding Home page to site: " + courseID);
  SitePage spHome = site.addPage();
  spHome.setTitle("Home");
  spHome.setLayout(SitePage.LAYOUT_SINGLE_COL);
  spHome.setPosition(homePosition);
  spHome.getPropertiesEdit().addProperty(SiteConstants.IS_HOME_PAGE, Boolean.TRUE.toString());
  LOG.debug("Manually adding " + iframeToolId + " tool to Home page in site: " + courseID);
  // quickie method to add a tool 
  ToolConfiguration tHome = spHome.addTool(iframeToolId);
  tHome.setTitle(crs.getTitle());
  tHome.setLayoutHints(iframeLayoutHints);

Seth



More information about the sakai-dev mailing list