Pixelsilk API function to enable or disable a section (page)--requires the edit-page-properties permission
sectionId: the unique identifier of the section (page)
enabled: true = enabled; false = disabled

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:

Url-encoded Data:

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:

Returned Data:

Back to Pages »