getAllSections()

Pixelsilk API function to get a list of all the sections (used from the Manage Pages UI)--requires the edit-page-properties permission
Parameters:
The function getAllSections has no parameters.

Output:
The function getAllSections returns an object containing a section and its children

C# Example:
object sections = GetAllSections();
Note the capital first letter of the C# method.

HTTP Example:
Request Headers:
POST /api2/getAllSections HTTP/1.1
HOST: www.example.com
Content-Length: 36
Content-Type: application/x-www-form-urlencoded
Cookie: auth=3BA754424233...3F34F05C9F12

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

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

Response Headers:
HTTP/1.1 200 OK
Set-Cookie: auth=E50645D353FB...5428FBB0B56; path=/
Content-Type: text/javascript; charset=UTF-8
Content-Length: 26619

Response Data:
{
  "menuName":"Home",
  "id":"a1d8a436-8292-4487-8d2b-efb75e1f0ed2",
  "urlRelative":"/",
  "enabled":true,
  "displayInNav":true,
  "includeInHtmlSiteMap":true,
  "approved":true,
  "typeImage":"Html",
  "typeName":"HTML Page",
  "children":[
    {
      "menuName":"ie1",
      "id":"3c3299c1-1c41-4eea-a81b-7d1cfc5911ce",
      "urlRelative":"/ie1/",
      "enabled":true,
      "displayInNav":true,
      "includeInHtmlSiteMap":true,
      "approved":true,
      "typeImage":"Html",
      "typeName":"HTML Page",
      "children":[
        {
          "menuName":"ie1-1",
          "id":"867ea9a1-209c-47e3-9dbb-a039a275cc47",
          "urlRelative":"/ie1/ie1-1/",
          "enabled":true,
          "displayInNav":true,
          "includeInHtmlSiteMap":true,
          "approved":true,
          "typeImage":"Html",
          "typeName":"HTML Page",
          "children":[
          ],
          "inheritSecurityFromParent":false,
          "inheritOptionsFromParent":false,
          "inheritUrlSettingsFromParent":false,
          "inheritAdvancedStettingsFromParent":false,
          "shouldBeEnabled":true,
          "shouldBeDisplayedInNav":true,
          "shouldBeVisibleInSiteMap":true,
          "isRoot":false
        }
      ],
      "inheritSecurityFromParent":false,
      "inheritOptionsFromParent":false,
      "inheritUrlSettingsFromParent":false,
      "inheritAdvancedStettingsFromParent":false,
      "shouldBeEnabled":true,
      "shouldBeDisplayedInNav":true,
      "shouldBeVisibleInSiteMap":true,
      "isRoot":false
    }
  ],
  "inheritSecurityFromParent":false,
  "inheritOptionsFromParent":false,
  "inheritUrlSettingsFromParent":false,
  "inheritAdvancedStettingsFromParent":false,
  "shouldBeEnabled":true,
  "shouldBeDisplayedInNav":true,
  "shouldBeVisibleInSiteMap":true,
  "isRoot":true
}
NOTE: most of the children have been removed to make this easier to look at.

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

Input Object:
The function getAllSections has no parameters.

Returned Data:
{
    "menuName":"Home",
    "id":"a1d8a436-8292-4487-8d2b-efb75e1f0ed2",
    "urlRelative":"/",
    "enabled":true,
    "displayInNav":true,
    "includeInHtmlSiteMap":true,
    "approved":true,
    "typeImage":"Html",
    "typeName":"HTML Page",
    "children":[
        {
            "menuName":"ie1",
            "id":"3c3299c1-1c41-4eea-a81b-7d1cfc5911ce",
            "urlRelative":"/ie1/",
            "enabled":true,
            "displayInNav":true,
            "includeInHtmlSiteMap":true,
            "approved":true,
            "typeImage":"Html",
            "typeName":"HTML Page",
            "children":[
                {
                    "menuName":"ie1-1",
                    "id":"867ea9a1-209c-47e3-9dbb-a039a275cc47",
                    "urlRelative":"/ie1/ie1-1/",
                    "enabled":true,
                    "displayInNav":true,
                    "includeInHtmlSiteMap":true,
                    "approved":true,
                    "typeImage":"Html",
                    "typeName":"HTML Page",
                    "children":[
                    ],
                    "inheritSecurityFromParent":false,
                    "inheritOptionsFromParent":false,
                    "inheritUrlSettingsFromParent":false,
                    "inheritAdvancedStettingsFromParent":false,
                    "shouldBeEnabled":true,
                    "shouldBeDisplayedInNav":true,
                    "shouldBeVisibleInSiteMap":true,
                    "isRoot":false
                }
            ],
            "inheritSecurityFromParent":false,
            "inheritOptionsFromParent":false,
            "inheritUrlSettingsFromParent":false,
            "inheritAdvancedStettingsFromParent":false,
            "shouldBeEnabled":true,
            "shouldBeDisplayedInNav":true,
            "shouldBeVisibleInSiteMap":true,
            "isRoot":false
        }
    ],
    "inheritSecurityFromParent":false,
    "inheritOptionsFromParent":false,
    "inheritUrlSettingsFromParent":false,
    "inheritAdvancedStettingsFromParent":false,
    "shouldBeEnabled":true,
    "shouldBeDisplayedInNav":true,
    "shouldBeVisibleInSiteMap":true,
    "isRoot":true
}
NOTE: most of the sections have been removed to make this easier to read.

Back to Pages »