Web Script: org/alfresco/components/site/customise-pages.post
Generated from /share/service/script/org/alfresco/components/site/customise-pages.post on Jun 14, 2026 5:44:29 PM

Script Properties
Id:org/alfresco/components/site/customise-pages.post
Short Name:Save Customize Site Pages
Description:Saves the the user selected pages from the Customize site pages component
Authentication:none
Transaction:none
Method:POST
URL Template:/components/site/customise-pages
Format Style:any
Default Format:json
Negotiated Formats:[undefined]
Implementation:class org.alfresco.web.scripts.DeclarativeWebScript
Extensions:[undefined]

Store: classpath:alfresco/site-webscripts

File: org/alfresco/components/site/customise-pages.post.desc.xml
<webscript>
   <shortname>Save Customize Site Pages</shortname>
   <description>Saves the the user selected pages from the Customize site pages component</description>
   <format default="json"/>
   <url>/components/site/customise-pages</url>
</webscript>
File: org/alfresco/components/site/customise-pages.post.json.ftl
{
   "success": ${success?string}
}
File: org/alfresco/components/site/customise-pages.post.json.js
// Get clients json request as a "normal" js object literal
var clientRequest = json.toString();
var clientJSON = eval('(' + clientRequest + ')');

// The site and pages we are modifiying
var siteId = clientJSON.siteId;
var newPages = clientJSON.pages;

/**
 * The web framework doesn't have a model for pages.
 * Since the dashboard page always exist for a page it can be used to save the pages.
 * Create a proeprty named "sitePages" in the dashboard page's properties object
 * and store a json string representing the pages.
 */

// Cast from object string
var newPagesString = jsonUtils.toJSONString(newPages) + "";

var p = sitedata.getPage("site/" + siteId + "/dashboard");
p.properties.sitePages = newPagesString;
p.save();

model.success = true;

Store: classpath:alfresco/webscripts

[No implementation files]