Difference between revisions of "CCAPI Library Component"
From ADF Docs
Line 3: | Line 3: | ||
<pre> | <pre> | ||
+ | <cfscript> | ||
metadata=structNew(); | metadata=structNew(); | ||
metadata.templateID=9122; | metadata.templateID=9122; | ||
Line 8: | Line 9: | ||
metadata.title="My New Page Title"; | metadata.title="My New Page Title"; | ||
application.ADF.csPage.createPage(metadata); | application.ADF.csPage.createPage(metadata); | ||
+ | </cfscript> | ||
</pre> | </pre> | ||
Line 16: | Line 18: | ||
=== CFC's === | === CFC's === | ||
− | * ccapi | + | * ccapi - Controls the main configuration of the app |
− | * csContent[[CCAPI Element|Populate Content into a Textblock/Custom Element]] | + | * csContent - [[CCAPI Element|Populate Content into a Textblock/Custom Element]] |
− | * csPage [[CCAPI Page|Create/Delete Pages]] | + | * csPage - [[CCAPI Page|Create/Delete Pages]] |
− | * csSubsite [[CCAPI Subsite|Create Subsites]] | + | * csSubsite - [[CCAPI Subsite|Create Subsites]] |
=== Config === | === Config === | ||
* [[CCAPI Config| CCAPI Config]] | * [[CCAPI Config| CCAPI Config]] | ||
+ | |||
+ | |||
+ | == Examples == | ||
+ | Refer to the above "CFC's" links for examples on how to use the CCAPI | ||
+ | |||
+ | <pre> | ||
+ | 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. | ||
+ | </pre> | ||
[[Category:Project]] | [[Category:Project]] | ||
[[Category:CCAPI]] | [[Category:CCAPI]] |
Revision as of 02:36, 8 March 2010
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.