getSiteListSections()

Pixelsilk API function to get the list sections belonging to the site--requires the edit-page-properties permission
Parameters:
The function getSiteListSections has no parameters.

Output:
The function getSiteListSections returns a collection of section objects. Each object contains the basic information about the section: menuName, id, urlrelative, enabled, displayInNav, includeInHtmlSiteMap, approved, typeImage, typeName, children.

C# Example:
List<object> sections = GetSiteListSections();
Note the capital first letter of the C# method.

HTTP Example:
Request Headers:
POST /api2/getSiteListSections HTTP/1.1
HOST: www.example.com
Content-Length: 36
Content-Type: application/x-www-form-urlencoded
Cookie: auth=6DFF3C54834C...CD59E759AFD7

Request Data:
Unencoded Data:
token=7AdbNHZQBtwc...RPTEK8UvSUQ=

Url-encoded Data:
token=7AdbNHZQBtwc...TEK8UvSUQ%3d

Response Headers:
HTTP/1.1 200 OK
Set-Cookie: auth=1E5AF1E87F89...B7578FE31F6; path=/
Content-Type: text/javascript; charset=UTF-8
Content-Length: 17628

Response Data:
[
  {
    "menuName":"TestListSection",
    "id":"3da1ca4b-cb13-45eb-8953-947cd1fabd78",
    "urlRelative":"/Page1/TestListSection",
    "enabled":true,
    "displayInNav":true,
    "includeInHtmlSiteMap":true,
    "approved":true,
    "typeImage":"Events",
    "typeName":"Stamps",
    "children":[
    ],
    "inheritSecurityFromParent":false,
    "inheritOptionsFromParent":false,
    "inheritUrlSettingsFromParent":false,
    "inheritAdvancedStettingsFromParent":false,
    "shouldBeEnabled":true,
    "shouldBeDisplayedInNav":true,
    "shouldBeVisibleInSiteMap":true,
    "isRoot":false
  }
]
Note: only one object was included in the list to make it easier to read.

JavaScript Example:
Method Call:
pixelsilk2.getSiteListSections(callback);

Input Object:
The function getSiteListSections has no parameters.

Returned Data:
[
    {
        "menuName":"TestListSection",
        "id":"3da1ca4b-cb13-45eb-8953-947cd1fabd78",
        "urlRelative":"/Page1/TestListSection",
        "enabled":true,
        "displayInNav":true,
        "includeInHtmlSiteMap":true,
        "approved":true,
        "typeImage":"Events",
        "typeName":"Stamps",
        "children":[
        ],
        "inheritSecurityFromParent":false,
        "inheritOptionsFromParent":false,
        "inheritUrlSettingsFromParent":false,
        "inheritAdvancedStettingsFromParent":false,
        "shouldBeEnabled":true,
        "shouldBeDisplayedInNav":true,
        "shouldBeVisibleInSiteMap":true,
        "isRoot":false
    },
    {
        "menuName":"AddExample",
        "id":"ad73bebe-694c-4c5a-9150-cfd0494cafdd",
        "urlRelative":"/Foo/AddExample/",
        "enabled":false,
        "displayInNav":true,
        "includeInHtmlSiteMap":true,
        "approved":true,
        "typeImage":"Articles",
        "typeName":"APIListSection",
        "children":[
        ],
        "inheritSecurityFromParent":true,
        "inheritOptionsFromParent":false,
        "inheritUrlSettingsFromParent":true,
        "inheritAdvancedStettingsFromParent":true,
        "shouldBeEnabled":false,
        "shouldBeDisplayedInNav":true,
        "shouldBeVisibleInSiteMap":true,
        "isRoot":false
    }
]
NOTE: many of the section skins were removed to make this easier to read.

Back to Pages »