CCAPI Library Component
From ADF Docs
Overview
CommonSpot has an extensive API for creating content (pages, subsites, images etc...). The API can however, be a bit difficult to work with. The CCAPI is a library utility packaged with the ADF. Using the CCAPI you can complete simple tasks like creating a page easily with code like this:
<cfscript> metadata=structNew(); metadata.templateID=9122; metadata.name="My New Page"; metadata.title="My New Page Title"; application.ADF.csPage.createPage(metadata); </cfscript>
The CCAPI is essentially an application but is located in the ADF Library in the /ADF/lib/CCAPI directory. The CCAPI components work together to make it easy to add/modify content programmatically.
CCAPI details
The CCAPI is actually a series of components in combination with a configuration file that piggybacks on top of the Application Site Config option.
CFC's
- ccapi - Controls the main configuration of the app
- csContent - Populate Content into a Textblock/Custom Element
- csPage - Create/Delete Pages
- csSubsite - Create Subsites
Config
Examples
Refer to the above "CFC's" links for examples on how to use the CCAPI
Note: Refer to the CommonSpot Developers Guide for information on how to configure the standard CommonSpot Content Creation API. The ADF CCAPI will not work if the CommonSpot Content Creation API is not configured correctly.