The user-generated content areas on your page can be retrieved as embedded HTML via a server-side include (SSI). The call to add user-generated content is made anonymously; i.e.you will not send us the ticket you received, described in
step 1 of this guide. However, in order for your users to make edits to the content, you will need to have retrieved the ticket and provided it to the
javascript client application outlined in
step 2.
When you have identified where on your page you want to include user-generated content, you simply add the SSI in that location. The HTML response is contained in a
<DIV> element and every ID and class used by the HTML and CSS is prefixed with "WPC" to avoid conflicts with your namespace.
Note that how you construct requests will vary depending on your platform and what frameworks you use. We have included some
sample applications with code snippets to help get you started.
ThreeTwo Different APIs
The
threetwo APIs (
getCellContent,
getCell, and getCellWithChildren) offer an increasing amount of data. At first, you should use
getCellWithChildrengetCell to retrieve as much data as possible -- this provides a "byline" for the content that includes information about the last author, a list of tags, and simple navigation to subpages. As you implement more API calls later, you can trim this request down.
Below is an example of the kind of information that can be returned with these calls.
Getting Cells Is Anonymous
These calls
do not require a ticket because the call is made anonymously and no special permissions are required to view content. This allows for caching the content requests (described later in this guide).
Cells and Cell Identifiers
Every section of user-generated content, or cell, is referenced by a unique identifier. This identifier is something you make up that is meaningful to your system. When you request a cell, you must send along this unique identifier.
WYSIWYG Editing and Saving Content
Once the content is retrieved by your server and sent to the client, the
client application enables WYSIWYG editing and saving of that content. To enable that functionality, refer to the next step of the
Integration Guide.
Next Step 4: Customize Interface Style