07-22-2011 09:03 AM
07-25-2011 03:40 AM
07-25-2011 04:19 AM
07-25-2011 04:58 AM
07-25-2011 05:16 AM
var docUrl = document.webdavUrl;
var docUrlArray = docUrl.split("/");
var siteName = "";
// parse site name from webdavUrl
for (var lcv = 0; lcv < docUrlArray.length; lcv++) {
if (docUrlArray[lcv] == "Sites") siteName = docUrlArray[lcv + 1];
}
// get site reference from site service
var site = siteService.getSite(siteName);
// define folders to use as templates for each site preset type
var templateMap = [{preset: "site-dashboard", path: "Data Dictionary/Site Folder Templates/Project Site"}];
// loop through templateMap
for (var lcv = 0; lcv < templateMap.length; lcv++) {
// act if site is of the desired preset
if (site.sitePreset == templateMap[lcv].preset) {
// set root node to copy child nodes from
var templateNode = companyhome.childByNamePath(templateMap[lcv].path);
// copy nodes from path to site
for (var n = 0; n < templateNode.children.length; n++) {
templateNode.children[n].copy(document, true);
}
// stop looping through templateMap
lcv = templateMap.length;
}
}
07-25-2011 05:27 AM
07-25-2011 05:39 AM
07-25-2011 05:45 AM
07-25-2011 06:20 AM
[size=85]var docUrl = document.webdavUrl;
var docUrlArray = docUrl.split("/");
var siteName = "";
// parse site name from webdavUrl
for (var lcv = 0; lcv < docUrlArray.length; lcv++) {
if (docUrlArray[lcv] == "Sites") siteName = docUrlArray[lcv + 1];
}
// get site reference from site service
var site = siteService.getSite(siteName);
// define folders to use as templates for each site preset type
var templateMap = [{preset: "site-dashboard", path: "Data Dictionary/Site Folder Templates/Project Site"}];
// loop through templateMap
for (var lcv = 0; lcv < templateMap.length; lcv++) {
// act if site is of the desired preset
if (site.sitePreset == templateMap[lcv].preset) {
// set root node to copy child nodes from
var templateNode = companyhome.childByNamePath(templateMap[lcv].path);
// copy nodes from path to site
for (var n = 0; n < templateNode.children.length; n++) {
templateNode.children[n].copy(document, true);
}
// stop looping through templateMap
lcv = templateMap.length;
}
}[/size]
07-25-2011 06:31 AM
You should start by creating the folder to store your templates in. Like I said, I put mine in the data dictionary. Once you have created that folder, you should create another folder inside of it. For this example, I created a template for my company’s project-related Sites in Data Dictionary/Site Folder Templates/Project Site.
1 - en Repositorio > Libreria de datos creo carpeta "Site Folder Templates" y dentro de esta creo "Project Site"
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.