enableSectionById()
Pixelsilk API function to enable or disable a section (page)--requires the edit-page-properties permission
Parameters:
sectionId: the unique identifier of the section (page)
enabled: true = enabled; false = disabled
Output:
The function enableSectionById returns void.
C# Example:
Guid sectionId = <section's id>;
bool enabled = true;
EnableSectionById(sectionId, enabled);
Note the capital first letter of the C# method.
HTTP Example:
Request Headers:
POST /api2/enableSectionById HTTP/1.1
HOST: www.example.com
Content-Length: 161
Content-Type: application/x-www-form-urlencoded
Cookie: auth=1EA25068D876...6C692CCB77BD
Request Data:
Unencoded Data:
json={
"sectionId":"03754619-b71b-47e7-866d-4f7856c081a0",
"enabled":"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=D30729AE270E...D28ACD55B9C; path=/
Content-Type: text/javascript; charset=UTF-8
Content-Length: 2
Response Data:
{}
JavaScript Example:
Method Call:
pixelsilk2.enableSectionById(input, callback);
Input Object:
{
sectionId:"51caaa3b-0667-4980-ad9f-72936c14bf94",
enabled:"true"
}
Returned Data:
{}
Back to Pages »