updateSection()

Pixelsilk API function to update the properties of a section (page)--requires the edit-page-properties permission
Parameters:
input: full section object with properties set

Output:
The function updateSection returns void.

C# Example:
For this example, assume you have create a full section object, set its properties, and named it inputObj.
object input = inputObj;
UpdateSection(input);
Note the capital first letter of the C# method.

HTTP Example:
Request Headers:
POST /api2/updateSection HTTP/1.1
HOST: www.example.com
Content-Length: 2877
Content-Type: application/x-www-form-urlencoded
Cookie: auth=BA7E8C801A9E...EEC33DC011CD

Request Data:
Unencoded Data:
json={
   "isRoot":false,
   "path":"/test/",
   "sortOrder":6,
   "pageType":"HTML Page",
   "pageTypeId":"a866eeb2-1e6a-4e31-931a-d1839dc29418",
   "baseType":"HTML Page",
   "pathName":"ralphtest1",
   "windowTitle":"First Test Section",
   "briefDescription":"ralphtest1",
   "metaDescription":"",
   "siteMapDescription":"",
   "metaKeywords":"",
   "itemsPerPage":10,
   "linksPerPage":10,
   "childPageExtension":".aspx",
   "includeInXmlSiteMap":true,
   "siteMapPriority":"0.7",
   "siteMapUpdateFrequency":"weekly",
   "head":"",
   "listSectionRedirectMode":"DetailPage",
   "listSectionRedirect":"",
   "listSectionSendEmail":false,
   "listSectionEmailFromText":null,
   "listSectionEmailFromField":null,
   "listSectionEmailReplyToText":null,
   "listSectionEmailReplyToField":null,
   "listSectionEmailToText":null,
   "listSectionEmailToField":null,
   "listSectionEmailSubjectText":null,
   "listSectionEmailSubjectField":null,
   "listSectionEmailInsertItem":false,
   "listSectionEmailBody":null,
   "defaultView":"ShowListItems",
   "urlMode":"PathSlash",
   "urlModeParameter":null,
   "toLowerCase":false,
   "redirects":"",
   "description":"",
   "security":[
      {"name":"Everyone,"id":"b69a7b39-7d88-47bf-835c-2baf14781aaa",
        "permissions":["view"]},
      {"name":"Administrators","id":"28702460-372d-4815-a594-92b9864b1085",
        "permissions":["edit","view"]},
      {"name":"SecurityTest","id":"4a364070-b45a-4e18-9587-ff65b941e401",
        "permissions":[]}
   ],
   "sortQuery":"",
   "filterQuery":"",
   "theme":null,
   "menuName":"ralphtest1",
   "id":"03754619-b71b-47e7-866d-4f7856c081a0",
   "urlRelative":"/test/ralphtest1/",
   "enabled":true,
   "displayInNav":true,
   "includeInHtmlSiteMap":true,
   "approved":true,
   "typeImage":"Html",
   "typeName":"HTML Page",
   "children":[

   ],
   "inheritSecurityFromParent":true,
   "inheritOptionsFromParent":false,
   "inheritUrlSettingsFromParent":true,
   "inheritAdvancedStettingsFromParent":true,
   "noMenuLink":false,
   "redirectToHttps":false,
   "redirectSection":false,
   "redirectSectionTo":null,
   "redirectSectionRendersUrl":false,
   "shouldBeEnabled":true,
   "shouldBeDisplayedInNav":true,
   "shouldBeVisibleInSiteMap":true,
}&token=7AdbNHZQBtwc...RPTEK8UvSUQ=

Url-encoded Data:
json={ +++...lse }&token=7AdbNHZQBtwc...TEK8UvSUQ=

Response Headers:
HTTP/1.1 200 OK
Set-Cookie: auth=2BACF7F51F53...5A6536F0724; path=/
Content-Type: text/javascript; charset=UTF-8
Content-Length: 2

Response Data:
{}

JavaScript Example:
Method Call:
pixelsilk2.updateSection(input, callback);

Input Object:
{
    "isRoot":false,
    "path":"/",
    "sortOrder":19,
    "pageType":"Cars",
    "pageTypeId":"031ce0ac-24c1-4254-a7ec-82a4d7fe5c8e",
    "baseType":"List Section",
    "pathName":"Foo",
    "windowTitle":"Foo",
    "briefDescription":"Foo",
    "metaDescription":"",
    "siteMapDescription":"",
    "metaKeywords":"",
    "itemsPerPage":10,
    "linksPerPage":10,
    "childPageExtension":".aspx",
    "includeInXmlSiteMap":true,
    "siteMapPriority":"",
    "siteMapUpdateFrequency":"",
    "head":"",
    "listSectionRedirectMode":"DetailPage",
    "listSectionRedirect":"",
    "listSectionSendEmail":false,
    "listSectionEmailFromText":null,
    "listSectionEmailFromField":null,
    "listSectionEmailToText":null,
    "listSectionEmailToField":null,
    "listSectionEmailSubjectText":null,
    "listSectionEmailSubjectField":null,
    "listSectionEmailInsertItem":false,
    "listSectionEmailBody":null,
    "defaultView":"ShowListItems",
    "urlMode":"PathSlash",
    "urlModeParameter":null,
    "toLowerCase":false,
    "redirects":null,
    "description":null,
    "security":[
       {"name":"Everyone","id":"b69a7b39-7d88-47bf-835c-2baf14781aaa",
          "permissions":["view"]},
       {"name":"Administrators","id":"28702460-372d-4815-a594-92b9864b1085",
          "permissions":["edit","view"]}
    ],
    "sortQuery":null,
    "filterQuery":null,
    "theme":null,
    "parent":{
        "isRoot":true,
        "path":"",
        "sortOrder":0,
        "pageType":"HTML Page",
        "pageTypeId":"a866eeb2-1e6a-4e31-931a-d1839dc29418",
        "baseType":"HTML Page",
        "pathName":"",
        "windowTitle":"localhost developer sandbox",
        "briefDescription":"Home",
        "metaDescription":"A content management system that
            knows what SEO specialists want to do.",
        "siteMapDescription":"",
        "metaKeywords":"test test",
        "itemsPerPage":0,
        "linksPerPage":10,
        "childPageExtension":".aspx",
        "includeInXmlSiteMap":true,
        "siteMapPriority":"",
        "siteMapUpdateFrequency":"",
        "head":"",
        "listSectionRedirectMode":"0",
        "listSectionRedirect":"",
        "listSectionSendEmail":false,
        "listSectionEmailFromText":"null",
        "listSectionEmailFromField":null,
        "listSectionEmailToText":"null",
        "listSectionEmailToField":null,
        "listSectionEmailSubjectText":"null",
        "listSectionEmailSubjectField":null,
        "listSectionEmailInsertItem":false,
        "listSectionEmailBody":"null",
        "defaultView":"ShowListItems",
        "urlMode":"PathSlash",
        "urlModeParameter":"/null",
        "toLowerCase":false,
        "redirects":"",
        "description":"",
        "security":[
           {"name":"Everyone",
              "id":"b69a7b39-7d88-47bf-835c-2baf14781aaa",
              "permissions":["view"]},
           {"name":"Administrators",
              "id":"28702460-372d-4815-a594-92b9864b1085",
              "permissions":["edit, view"]}
        ],
        "sortQuery":"null",
        "filterQuery":"null",
        "theme":"Default",
        "parent":null,
        "menuName":"Home",
        "id":"a1d8a436-8292-4487-8d2b-efb75e1f0ed2",
        "urlRelative":"/",
        "enabled":true,
        "displayInNav":true,
        "includeInHtmlSiteMap":true,
        "approved":true,
        "typeImage":"Html",
        "typeName":"HTML Page",
        "children":[
        ],
        "inheritSecurityFromParent":false,
        "inheritOptionsFromParent":false,
        "inheritUrlSettingsFromParent":false,
        "inheritAdvancedStettingsFromParent":true,
        "noMenuLink":false,
        "redirectToHttps":false,
        "redirectSection":false,
        "redirectSectionTo":null,
        "redirectSectionRendersUrl":false,
        "shouldBeEnabled":true,
        "shouldBeDisplayedInNav":true,
        "shouldBeVisibleInSiteMap":true
    },
    "menuName":"Foo",
    "id":"be799b8b-e177-47fc-97dc-d10a1d2202a1",
    "urlRelative":"/Foo/",
    "enabled":true,
    "displayInNav":false,
    "includeInHtmlSiteMap":true,
    "approved":true,
    "typeImage":"Parent",
    "typeName":"Cars",
    "children":[
    ],
    "inheritSecurityFromParent":true,
    "inheritOptionsFromParent":true,
    "inheritUrlSettingsFromParent":true,
    "inheritAdvancedStettingsFromParent":true,
    "noMenuLink":true,
    "redirectToHttps":true,
    "redirectSection":true,
    "redirectSectionTo":null,
    "redirectSectionRendersUrl":true,
    "shouldBeEnabled":true,
    "shouldBeDisplayedInNav":true,
    "shouldBeVisibleInSiteMap":true
}

Returned Data:
{}

Back to Pages »