Documentation > CMS Template API Library
CMS Template API Library
The CMS Template API library is your point of access to the CrownPeak platform. This collection of classes, methods and examples allow template developers to create a custom content editing experience in your instance. Assets in the CMS can be managed through the use of the 16 template file types to edit, preview and control the deployment of your content. Below is the list of classes and corresponding methods (a.k.a. member functions). Click on the method to see the details of each function including the parameter list and an real world example.
Name | Description | Type |
---|---|---|
Arg | This type is used when enumerating over the PublishingArgs. |
Class |
Asset | Encapsulates the CMS Asset. Methods for loading and manipulating assets and their data are found in here. Meta data about the asset such as the Label and Id are represented by properties. (asset.Label, asset.Id) Custom data that has been provided from the client is accessible through an indexer (see Item(String) Property below) |
Class |
AssetPanelEntry | Represents a single Panel within a ListPanel that was intialized from the children of a folder. Returned in a List by calling asset.GetPanelsFromFolder() |
Class |
AssetParams | Parameters to be used in Asset.GetFileList and Asset.GetFolderList. |
Class |
AssetPath | Represents the path to an in the CMS. |
Class |
AssetPropertyNames | An enumeration representing the names of properties of the class. Can be used in . |
Class |
AssetType | Types of assets. |
Class |
AuditAction | A particular action that was taken. |
Class |
AuditData | An entry in the system history. |
Class |
BinaryFile | Methods for processing binary assets into Base64. |
Class |
Comparison | An enumeration representing operations that can be used in . |
Class |
ContentParseMetadata | Result of content parsed by ACB for binary uploads only. Data may not be available. |
Class |
ContentType | Represents a content type (or MIME type) used, for example, in emails. |
Class |
Context | The base class of all contexts. The methods and properties that are common to all contexts are defined here. This class does not get instantiated directly. |
Class |
CopyActionType | types |
Class |
CopyContext | The context available when running the copy.aspx template file. Only runs when copying a file. |
Class |
cpTimeZone | Use these as constants when specifying a timezone. |
Class |
DataContractSerializer | Experimental methods. They could change in a future release. Use at your own risk. You can use [DataContract] to tag serializable classes. Use [DataMember] on properties and [EnumMember] for enums. These classes have the advantage that you can use them for Xml or JSON, but they are not as flexible for the Xml. |
Class |
DeleteContext | The context available when running the delete.aspx template file |
Class |
DeleteHttpParams | Parameters to be used in Util.DeleteHttp. |
Class |
DeleteHttpResponse | The object returned by Util.DeleteHttp. It contains the response text and various meta information about the DELETE request. |
Class |
EmailAttachment | Class representing an email attachment |
Class |
EmailContext | Context for an Email Template (email.aspx). Used when sending email via a workflow step. The template does not have to send the email. |
Class |
ExecuteWorkflowCommandResponse | Returned by some calls to encapsulate the result of the operation. |
Class |
FeatureType | A set of Wysiwyg Editor Features. |
Class |
FedAuthHosting | Utlities for loading and saving Configuration |
Class |
FedPublishingPackage | Encapsulates Publishing Package Info. Available during Publishing and during "View Output". In the case of output, there may not be any specific publishing information so a package is picked from a list of available packages so that "view output" may more closely model the publishing output. |
Class |
FilterParams | Parameters to be used in Asset.GetFilterList. |
Class |
FilterTextType | Types of text filters that can be used in |
Class |
FolderType | Types of folders. |
Class |
FtpImportContext | Context for an FTP Import |
Class |
GetHttpParams | Parameters to be used in Util.GetHttp. |
Class |
GetHttpResponse | The object returned by Util.GetHttp. It contains the response text and various meta information about the GET request. |
Class |
HttpParams | Base class of PostHttpParams. |
Class |
HttpResponse | Base class of PostHttpParams and GetHttpParams. Do not use directly. |
Class |
Img | Functions for using and manipulating images |
Class |
ImgResult | Returned by some calls to encapsulate the result of the operation. Contains the resulting image and properties to tell whether there was an error and to provide an error message |
Class |
Input | A collection of methods used to create input controls. |
Class |
InputContext | The context available when running the input template file - input.aspx Also used in the new template file - new.aspx |
Class |
InputForm | A construct that allows you to read, edit, add, or remove form fields before they are commited to the Database. |
Class |
InputLinkType | Types of links that can be used in an input form. |
Class |
IPublishing | If a context implements this, it means that the template MAY render during publishing and this would contain information that is relevant to publishing including information needed to render live links. |
Class |
LassoParams | Encapsulates a set of parameters used with image manipulation such as scaling and croping. |
Class |
Layout | This class encapsulates all of the functions utilized by the Layout Definition Template |
Class |
LinkType | Link types to pass to . |
Class |
ListPanelType | Types of list panels used in |
Class |
MessageType | Represents the type of a ShowMessage box. |
Class |
Meta | The contents of the asset's metadata. |
Class |
OperationType | Enumeration that specifies the type of update Operation described by the SearchG2JsonParams class. |
Class |
Out | The Out object provides the CMS templates with a variety of output functions. Many provide a means to manipulate text for the template text response, wrapping and debugging |
Class |
OutputContext | The context available when running the output template file Also available when running filename.aspx, url.aspx, assetfilename.aspx, and asseturl.aspx |
Class |
PageLink | A link contained in the PaginatedLinks collection. Returned while enumerating over the paginatedLinks collection. Use the PageNumber property to get the page number associated with this link. Call ToString() to get the actual link. |
Class |
PaginatedLinks | A collection of PageLinks created to point at the pages that are needed to display a list that was paginated with Util.Paginate. See the examples in PaginateResult or Util.Paginate. |
Class |
PaginateFieldResult | The result returned from and contains various information such as the content from the current page and the links to the other pages. |
Class |
PaginatePanelResult | Returns the results of the paginate call. You can enumerate over it to get the sub list items. |
Class |
PaginateResult | Returns the results of the paginate call. You can enumerate over it to get the sub list items. |
Class |
PaginateResultBase | Base class of PaginateResult and PaginatePanelResult. |
Class |
PanelEntry | Represents a single Panel within a ListPanel |
Class |
Params | Base class of and . Do not use directly. |
Class |
Path | Encapsulates path information. Parses a path into various parts. Usually available from filename.aspx, url.aspx, asseturl.aspx, and assetfilename.aspx. Usually available from output.aspx when publishing. |
Class |
PathInfo | Container for path information. |
Class |
PickerViewType | Use this to decide the type of picker view used in the Acquire window |
Class |
PostHttpParams | Parameters to be used in Util.PostHttp. |
Class |
PostHttpResponse | The object returned by Util.PostHttp. It contains the response text and various meta information about the POST request. |
Class |
PostInputContext | Context for the post_input.aspx template file. Runs before data is saved. Use post_save.aspx to run after the save. Use InputForm to read and manipulate data that will be saved to the current asset. It will be populated by the data posted from the input form (input.aspx), but you can change, add, or remove values. |
Class |
PostPublishContext | The context available when running the post_publish.aspx template file. |
Class |
PostSaveContext | Context for post_save.aspx template file which runs after input form (Input.aspx) data is saved. Use post_input.aspx to run before the save. |
Class |
ProtocolType | Available in builds 4201 and up. Represents a protocol type to be used in the call to GetLink. |
Class |
PublishDirection | Used in the PostPublishContext this tells you more about the type of operation that was going on. |
Class |
PublishingArgs | An object which encapsulates the publishing args. |
Class |
PublishingPackage | Encapsulates Publishing Package Info. Available during Publishing and during "View Output". In the case of output, there may not be any specific publishing information so a package is picked from a list of available packages so that "view output" may more closely model the publishing output. |
Class |
PutHttpParams | Parameters to be used in Util.PutHttp. |
Class |
PutHttpResponse | The object returned by Util.PutHttp. It contains the response text and various meta information about the PUT request. |
Class |
Raw | The raw contents of the asset fields. This removes any special formatting from a content field. |
Class |
RawAssetPanel | The raw version of AssetPanel. This removes any special formatting from returned values. |
Class |
RawPanel | The raw version of Panel. This removes any special formatting from returned values. |
Class |
RelationshipType | Use this to see if this is related to the parent asset as an a link to an asset or if it is an attachment (not an asset) |
Class |
RouteResponse | Returned by some calls to encapsulate the result of the operation. Contains the resulting image and properties to tell whether there was an error and to provide an error message |
Class |
SearchG2Context | The context available when running a search_g2_*.aspx template file. |
Class |
SearchG2JsonParams | Parameters to be used in SearchG2Context JsonParams property which generates a JSON string for updating content in a Search G2 Collection. See https://wiki.apache.org/solr/UpdateJSON for more details on the JSON format, this class will create the JSON for you. The collection updated is based on the Search G2 Server configured on the Publishing Package. |
Class |
SectionElement | Used to model Xml so you can edit the generated web.config sections when usign FedAuthHosting |
Class |
SelectListSort | Sort options for the method. |
Class |
ShowAcquireParams | Params used in conjunction with Input.ShowAcquireDocument(string, string, ShowAcquireParams, string) and with Input.ShowAcquireImage(string, string, ShowAcquireParams, string, string). |
Class |
SiteRootProperties | The Properties of a Site Root asset. |
Class |
Size | Used to specify the desired size of an image created at upload time. |
Class |
SmtpImportContext | Context for an Smpt Import Template (smtp_import.aspx). Used when recieving an email import. |
Class |
SortOrder | Represents an order by which assets or panels can be sorted. Allows for multiple levels of sorting on both built-in and custom asset fields. |
Class |
Status | A status as related to workflow or publishing |
Class |
TemplateBuilder | This class encapsulates all of the functions utilized by the Component Builder Template |
Class |
Transition | Represents a Workflow Transition that occurred for an asset. |
Class |
UIType | The possible types of user interface from which the current user can run the template. |
Class |
UploadContext | The context for upload.aspx. Called when uploading a file with an input form (input.aspx). |
Class |
UploadedFile | Class representing an uploading file |
Class |
UploadedFiles | Collection of uploaded files in this context. |
Class |
User | Represents a CMS User |
Class |
UserVariables | A place to store data as key value pairs to retrieve later. Can be shared when calling other templates with Asset.Show, Asset.GetLink, and by a Wrapper as long as all templates involved are C#. |
Class |
Util | Contains a set of utility methods. |
Class |
UtilityLinkParams | Params for creating UtilityLinks |
Class |
UtilityLinkType | Used for specifying a Utility link type. Used in conjuction with Asset.GetCmsUtilityLink |
Class |
Workflow | Encapsulates a workflow |
Class |
WrapperBuilder | This class encapsulates all of the functions utilized by the Component Builder Template |
Class |
WysiwygParams | The set of Params for enabling and disabling features in the Wysiwyg editor. |
Class |
XmlAttributes | Represents a set of xml attributes. The key is the attribute name and the value is the attribute value. Attempting to access an attribute that is not present will return an empty string. |
Class |
XmlNode | Represents an Xml node. Contains a set of attributes and a set of elements. As well as the Name of the tag and the Value of the tag. |
Class |
XmlSerializer | Experimental methods. They could change in a future release. Use at your own risk. You can use Xml attribute tags from here http://msdn.microsoft.com/en-us/library/83y7df3e(v=vs.100).aspx in your classes and Serialize and Deserialize with this class Tag classes and members with various attributes without fully qualifying them. use [XmlElement] but not "[System.Xml.Serialization.XmlElementAttribute]" |
Class |
XUtils | A collection of experimental utilities. Use at your own risk. These may be changed or removed at a later date. |
Class |