As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
function main() { // Get the shortname var shortName = url.extension; // Get the site var site = siteService.getSite(shortName); var patterns = new Array(); // Get the list of sites var sites = siteService.listSites(null, null); // Copen: select child patterns of current community only if (sites != null) { for each (sitepat in sites) { if(sitepat.sitePreset == "pattern-dashboard") { var community = sitepat.description.substring(18, sitepat.description.indexOf("]", 0)); if( community == shortName) { var pat = siteService.getSite(sitepat.shortName); patterns.push(pat); } } } } if (site != null) { for(var i = 0; i < patterns.length; i++) { patterns[i].description = "communityRecovery"; patterns[i].save(); } // Delete the site site.deleteSite(); } else { // Return 404 status.setCode(404, "The community " + shortName + " does not exist"); return; } } main();
if( community == shortName) { var pat = siteService.getSite(sitepat.shortName); patterns.push(pat); }
if( community == "site2") { var pat = siteService.getSite(sitepat.shortName); patterns.push(pat); }