moveSectionInsertBefore()

Pixelsilk API function to move a section to be immediately before another section (used from the Manage Pages UI)--requires the move-page permission
Parameters:
sectionToMoveId: the unique identifier of the section to be moved
sectionToInsertBeforeId: the unique identifier of the section it is to be inserted before

Output
:
The function moveSectionInsertBefore returns void.

C# Example:
Guid sectionToMoveId = <id of section to move>;
Guid sectionToInsertBeforeId = <id of section to insert before>;
MoveSectionInsertBefore(sectionToMoveId, sectioToInsertBeforeId);
Note the capital first letter of the C# method.

HTTP Example:
Request Headers:
POST /api2/moveSectionInsertBefore HTTP/1.1
HOST: www.example.com
Content-Length: 215
Content-Type: application/x-www-form-urlencoded
Cookie: auth=C949A2B8F95F...1D114A1881A6

Request Data:
Unencoded Data:
json={
   "sectionToMoveId":"39d80eed-9428-4e23-aed3-c0fb52ab9013",
   "sectionToInsertBeforeId":"03754619-b71b-47e7-866d-4f7856c081a0"
}&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=DC64C2181B16...DF9BD1EDD5E; path=/
Content-Type: text/javascript; charset=UTF-8
Content-Length: 2

Response Data:
{}

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

Input Object:
{
    sectionToMoveId:"51caaa3b-0667-4980-ad9f-72936c14bf94",
    sectionToInsertBeforeId:"be799b8b-e177-47fc-97dc-d10a1d2202a1"
}

Returned Data:
{}

Back to Pages »