showSectionInMenu()

Pixelsilk API function to hide or unhide a section (page) from the navigation (used from the Manage Pages UI)--requires the edit-page-properties permission
Parameters:
sectionId: the unique identifier of the section (page)
show: true = show; false = hide

Output:
The function showSection inMenu returns void.

C# Example:
Guid sectionId = <section's id>;
bool show = true;
ShowSectionInMenu(sectionId, show);
Note the capital first letter of the C# method.

HTTP Example:
Request Headers:
POST /api2/showSectionInMenu HTTP/1.1
HOST: www.example.com
Content-Length: 158
Content-Type: application/x-www-form-urlencoded
Cookie: auth=296341A313F9...54DCA56950A7

Request Data:
Unencoded Data:
json={
   "sectionId":"03754619-b71b-47e7-866d-4f7856c081a0",
   "show":"true"
}&token=7AdbNHZQBtwc...RPTEK8UvSUQ=

Url-encoded Data:
json=%7b%0d%0a+++...%22%0d%0a%7d&token=7AdbNHZQBtwc...TEK8UvSUQ%3d

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

Response Data:
{}

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

Input Object:
{
    sectionId:"51caaa3b-0667-4980-ad9f-72936c14bf94",
    show:"true"
}

Returned Data:
{}

Back to Pages »