getWebboxContent()

Pixelsilk API function to get the content of a webbox
Parameters:
webboxName: the name of the webbox
path: the path to the section (page) the webbox is on relative to the root

Output:
The function getWebboxContent returns a string containing the content.

C# Example:
string webboxName = "pageWebbox";
string path = "/folder1/pageName";
string content = GetWebboxContent(webboxName, path);
Note the capital first letter of the C# method.

HTTP Example:
Request Headers:
POST /api2/getWebboxContent HTTP/1.1
HOST: www.example.com
Content-Length: 146
Content-Type: application/x-www-form-urlencoded
Cookie: auth=B54748D49670...B49F71788C8F

Request Data:
Unencoded Data:
json={
   "webboxName":"ExampleHtmlWebbox",
   "path":"/test/"
}&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=40F95B7E1F39...76FE92A7C70; path=/
Content-Type: text/javascript; charset=UTF-8
Content-Length: 30

Response Data:
"This is the initial content."

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

Input Object:
{
    webboxName:"ExampleHtmlWebbox",
    path:"/TestList/test/"
}

Returned Data:
"This is the initial content."

Back to Content »