updatePageType()

Pixelsilk API function to edit a page type's properties--requires the advanced-admin-access permission
Parameters:
id: the unique identifier of the page type
name: the name of the page type
image: the icon used for the page type

Output:
The function updatePageType returns void.

C# Example:
Guid id = <page type's id>;
string name = "nameOfPageType";
string image = "iconOfPageType";
UpdatePageType(id, name, image);
Note the capital first letter of the C# method.

HTTP Example:
Request Headers:
POST /api2/updatePageType HTTP/1.1
HOST: www.example.com
Content-Length: 195
Content-Type: application/x-www-form-urlencoded
Cookie: auth=E329F778AADB...01E359D1126C

Request Data:
Unencoded Data:
json={
   "id":"56e7e8e2-fb4a-4aea-8bdb-d335f0e83462",
   "name":"ExampleList",
   "image":"Books"
}&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=B81A69D44DEB...A0C290C21B7; path=/
Content-Type: text/javascript; charset=UTF-8
Content-Length: 2

Response Data:
{}

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

Input Object:
{
    id:"56e7e8e2-fb4a-4aea-8bdb-d335f0e83462",
    name:"ExampleList",
    image:"Media"
}

Returned Data:
{}

Back to Page Types »