// CREATE SITE
var name="MonSite";
var leSite = siteService.createSite("site-dashboard", name, name, name, "PUBLIC");
var siteNode = leSite.node;
var configNode = siteNode.createFolder("surf-config");
var componentsNode = configNode.createFolder("components");
// TITLE
var docName = "page.title.site~" + name + "~dashboard.xml";
var contentPreset = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"+
"<component>\n"+
"<guid>page.title.site~" + name + "~dashboard</guid>\n"+
" <scope>page</scope>\n"+
" <region-id>title</region-id>\n"+
" <source-id>site/" + name + "/dashboard</source-id>\n"+
" <url>/components/title/collaboration-title</url>\n"+
"</component>";
var doc = componentsNode.createFile(docName);
doc.content = contentPreset;
// NAVIGATION
var docName = "page.navigation.site~" + name + "~dashboard.xml";
var contentPreset="<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"+
"<component>\n"+
" <guid>page.navigation.site~" + name + "~dashboard</guid>\n"+
" <scope>page</scope>\n"+
" <region-id>navigation</region-id>\n"+
" <source-id>site/" + name + "/dashboard</source-id>\n"+
" <url>/components/navigation/collaboration-navigation</url>\n"+
"</component>";
var doc = componentsNode.createFile(docName);
doc.content = contentPreset;
// DASHLET
var docName = "page.full-width-dashlet.site~" + name + "~dashboard.xml";
var contentPreset="<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"+
"<component>\n"+
" <guid>page.full-width-dashlet.site~" + name + "~dashboard</guid>\n"+
" <scope>page</scope>\n"+
" <region-id>full-width-dashlet</region-id>\n"+
" <source-id>site/" + name + "/dashboard</source-id>\n"+
" <url>/components/dashlets/dynamic-welcome</url>\n"+
" <properties>\n"+
" <dashboardType>site</dashboardType>\n"+
" </properties>\n"+
"</component>";
var doc = componentsNode.createFile(docName);
doc.content = contentPreset;
// COMPONENT
var docName = "page.component-1-1.site~" + name + "~dashboard.xml";
var contentPreset="<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"+
"<component>\n"+
" <guid>page.component-1-1.site~" + name + "~dashboard</guid>\n"+
" <scope>page</scope>\n"+
" <region-id>component-1-1</region-id>\n"+
" <source-id>site/" + name + "/dashboard</source-id>\n"+
" <url>/components/dashlets/colleagues</url>\n"+
" <properties>\n"+
" <height>504</height>\n"+
" </properties>\n"+
"</component>";
var doc = componentsNode.createFile(docName);
doc.content = contentPreset;
var docName = "page.component-2-1.site~" + name + "~dashboard.xml";
var contentPreset="<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"+
"<component>\n"+
" <guid>page.component-2-1.site~" + name + "~dashboard</guid>\n"+
" <scope>page</scope>\n"+
" <region-id>component-2-1</region-id>\n"+
" <source-id>site/" + name + "/dashboard</source-id>\n"+
" <url>/components/dashlets/docsummary</url>\n"+
"</component>";
var doc = componentsNode.createFile(docName);
doc.content = contentPreset;
var docName = "page.component-2-2.site~" + name + "~dashboard.xml";
var contentPreset="<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"+
"<component>\n"+
" <guid>page.component-2-2.site~" + name + "~dashboard</guid>\n"+
" <scope>page</scope>\n"+
" <region-id>component-2-2</region-id>\n"+
" <source-id>site/" + name + "/dashboard</source-id>\n"+
" <url>/components/dashlets/activityfeed</url>\n"+
"</component>";
var doc = componentsNode.createFile(docName);
doc.content = contentPreset;
var pagesFolderNode = configNode.createFolder("pages").createFolder("site").createFolder(name);
var docName = "dashboard.xml";
var contentPreset="<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"+
"<page>\n"+
" <title>Collaboration Site Dashboard</title>\n"+
" <title-id>page.siteDashboard.title</title-id>\n"+
" <description>Collaboration site's dashboard page</description>\n"+
" <description-id>page.siteDashboard.description</description-id>\n"+
" <authentication>user</authentication>\n"+
" <template-instance>dashboard-2-columns-wide-right</template-instance>\n"+
" <properties>\n"+
" <sitePages>[{\"pageId\":\"documentlibrary\"}]</sitePages>\n"+
" </properties>\n"+
"</page>";
var doc = pagesFolderNode.createFile(docName);
doc.content = contentPreset;
Content from pre 2016 and from language groups that have been closed.
Content is read-only.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.