showSectionInSitemap()

Pixelsilk API function to hide or unhide a section (page) from the sitemap (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 showSectionInSitemap returns void.

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

HTTP Example:
Request Headers:
POST /api2/showSectionInSitemap HTTP/1.1
HOST: www.example.com
Content-Length: 158
Content-Type: application/x-www-form-urlencoded
Cookie: auth=164C1A5AE483...A07B51EF3FD6

Request Data:
Unencoded Data:
json={
   "sectionId":"39d80eed-9428-4e23-aed3-c0fb52ab9013",
   "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=96EFF51D5073...8211068DEF9; path=/
Content-Type: text/javascript; charset=UTF-8
Content-Length: 2

Response Data:
{}

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

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

Returned Data:
{}

Back to Pages »