I'm in share Javascript and writing code for a page in a site. I have access to page.url.templateArgs.site which gives me the site id. How do I get the site title from this site Id string?
I think I can get to the site title or site description if I can get to the site object. However, I don't know how to get the site object for the current site. I tried this code but get error "org.mozilla.javascript.EcmaError: ReferenceError: "siteService" is not defined."
var mysite = siteService.getSite(page.url.templateArgs.site);
Do I have to include some standard JS in the header?
FYI - I'm customizing this JS \webapps\share\WEB-INF\classes\alfresco\web-extension\site-webscripts\org\alfresco\components\dashboard\customise-dashlets.get.js to detect if the site title contain certain name and flag certain dashlets as not visible. I can evaluate the site shortname (ID) but I need to evaluate the site title instead.
Thanks a bunch!