Table of Contents

Class CPContentBaseClass

Namespace
Contensive.BaseClasses
Assembly
CPBase.dll
public abstract class CPContentBaseClass
Inheritance
CPContentBaseClass
Inherited Members

Properties

LatestContentModifiedDate

Track the latest modified date

public abstract LastestDateTrackerBaseModel LatestContentModifiedDate { get; set; }

Property Value

LastestDateTrackerBaseModel

Methods

AbortEdit(string, int)

workflow editing is deprecated

[Obsolete("workflow editing is deprecated", false)]
public abstract void AbortEdit(string ContentName, int RecordId)

Parameters

ContentName string
RecordId int

AddContent(string)

Create a new content with default fields. sqlTablename created from contentName. After the call, modify the content with the database model - Models.Db.ContentModel.create( cp, id )

public abstract int AddContent(string ContentName)

Parameters

ContentName string

Returns

int

AddContent(string, string)

Create a new content with sqlTablename and default fields. After the call, modify the content with the database model - Models.Db.ContentModel.create( cp, id )

public abstract int AddContent(string ContentName, string sqlTableName)

Parameters

ContentName string
sqlTableName string

Returns

int

AddContent(string, string, string)

Create a new content with sqlTablename and default fields on the default datasource. After the call, modify the content with the database model - Models.Db.ContentModel.create( cp, id )

public abstract int AddContent(string ContentName, string sqlTableName, string dataSource)

Parameters

ContentName string
sqlTableName string
dataSource string

Returns

int

AddContentField(string, string, FieldTypeIdEnum)

Create a new field in an existing content, return the fieldid

public abstract int AddContentField(string ContentName, string FieldName, CPContentBaseClass.FieldTypeIdEnum fieldTypeId)

Parameters

ContentName string
FieldName string
fieldTypeId CPContentBaseClass.FieldTypeIdEnum

Returns

int

AddContentField(string, string, fileTypeIdEnum)

Deprecated, use method with FieldTypeIdEnum

[Obsolete("Deprecated, use method with FieldTypeIdEnum", false)]
public abstract int AddContentField(string ContentName, string FieldName, CPContentBaseClass.fileTypeIdEnum fileTypeEnum)

Parameters

ContentName string
FieldName string
fileTypeEnum CPContentBaseClass.fileTypeIdEnum

Returns

int

AddContentField(string, string, int)

Create a new field in an existing content, return the fieldid

public abstract int AddContentField(string ContentName, string FieldName, int FieldType)

Parameters

ContentName string
FieldName string
FieldType int

Returns

int

AddRecord(object)

Deprecated, use AddRecord(string)

[Obsolete("Deprecated, use AddRecord(string)", false)]
public abstract int AddRecord(object ContentName)

Parameters

ContentName object

Returns

int

AddRecord(string)

Inserts a record and returns the Id for the record

public abstract int AddRecord(string ContentName)

Parameters

ContentName string

Returns

int

AddRecord(string, string)

Insert a record and set its name. REturn the id of the record.

public abstract int AddRecord(string ContentName, string recordName)

Parameters

ContentName string
recordName string

Returns

int

ApproveEdit(string, int)

workflow editing is deprecated

[Obsolete("workflow editing is deprecated", false)]
public abstract void ApproveEdit(string ContentName, int RecordId)

Parameters

ContentName string
RecordId int

Delete(string, string)

Delete records based from a table based on a content name and SQL criteria.

public abstract void Delete(string ContentName, string SQLCriteria)

Parameters

ContentName string
SQLCriteria string

DeleteContent(string)

Delete a content from the system, sqlTable is left intact. Use db.DeleteTable to drop the table

public abstract void DeleteContent(string ContentName)

Parameters

ContentName string

Get an icon linked to the administration site which adds a new record to the content.

public abstract string GetAddLink(int contentId)

Parameters

contentId int

Returns

string

Get an icon linked to the administration site which adds a new record to the content.

public abstract string GetAddLink(int contentId, string presetNameValueList)

Parameters

contentId int
presetNameValueList string

Returns

string

Get an icon linked to the administration site which adds a new record to the content.

public abstract string GetAddLink(int contentId, string presetNameValueList, bool includeChildContent)

Parameters

contentId int
presetNameValueList string
includeChildContent bool

If true, return a crlf delimited list of add tags, including add links for child content

Returns

string

Get an icon linked to the administration site which adds a new record to the content.

public abstract string GetAddLink(string contentName)

Parameters

contentName string

Returns

string

Get an icon linked to the administration site which adds a new record to the content.

public abstract string GetAddLink(string contentName, string presetNameValueList)

Parameters

contentName string
presetNameValueList string

Returns

string

Get an icon linked to the administration site which adds a new record to the content.

public abstract string GetAddLink(string contentName, string presetNameValueList, bool allowPaste, bool isEditing)

Parameters

contentName string
presetNameValueList string

A comma delimited list of name=value pairs. Each name is a field name and the value is used to prepopulate the new record.

allowPaste bool

If true and the content supports cut-paste from the public site, the returned string will include a cut icon.

isEditing bool

If false, this call returns nothing. Set it true if IsEdiing( contentname ) is true.

Returns

string

Get an icon linked to the administration site which adds a new record to the content.

public abstract string GetAddLink(string contentName, string presetNameValueList, bool allowPaste, bool isEditing, bool includechildContent)

Parameters

contentName string
presetNameValueList string

A comma delimited list of name=value pairs. Each name is a field name and the value is used to prepopulate the new record.

allowPaste bool

If true and the content supports cut-paste from the public site, the returned string will include a cut icon.

isEditing bool

If false, this call returns nothing. Set it true if IsEdiing( contentname ) is true.

includechildContent bool

If true, return a crlf delimited list of add tags, including add links for child content

Returns

string

GetContentControlCriteria(string)

Returns an SQL compatible where-clause which includes all the contentcontentid values allowed for this content name.

public abstract string GetContentControlCriteria(string contentName)

Parameters

contentName string

Returns

string

GetCopy(string)

Get the string from the 'Copy Content' record based on its name. If the record does not exist it is created with the default value provided.

public abstract string GetCopy(string CopyName)

Parameters

CopyName string

Returns

string

GetCopy(string, string)

Get the string from the 'Copy Content' record based on its name. If the record does not exist it is created with the default value provided.

public abstract string GetCopy(string CopyName, string DefaultContent)

Parameters

CopyName string
DefaultContent string

Returns

string

GetCopy(string, string, int)

Get the string from the 'Copy Content' record based on its name. If the record does not exist it is created with the default value provided.

public abstract string GetCopy(string CopyName, string DefaultContent, int personalizationPeopleId)

Parameters

CopyName string
DefaultContent string
personalizationPeopleId int

Returns

string

GetDataSource(string)

Returns the datasource name of the content given.

public abstract string GetDataSource(string ContentName)

Parameters

ContentName string

Returns

string

Get the system edit link

public abstract string GetEditLink(int contentId, int recordId)

Parameters

contentId int
recordId int

Returns

string

Get the system edit link

public abstract string GetEditLink(int contentId, int recordId, string customCaption)

Parameters

contentId int
recordId int
customCaption string

Returns

string

Get the system edit link

public abstract string GetEditLink(int contentId, string recordGuid)

Parameters

contentId int
recordGuid string

Returns

string

Get the system edit link

public abstract string GetEditLink(int contentId, string recordGuid, string customCaption)

Parameters

contentId int
recordGuid string
customCaption string

Returns

string

Get the system edit link

public abstract string GetEditLink(string contentName, int recordId)

Parameters

contentName string
recordId int

Returns

string

Get the system edit link

public abstract string GetEditLink(string contentName, int recordId, string customCaption)

Parameters

contentName string
recordId int
customCaption string

Returns

string

Get the system edit link

public abstract string GetEditLink(string contentName, string recordGuid)

Parameters

contentName string
recordGuid string

Returns

string

Returns the edit-tab (icon plus caption) that should appear over the region to be edited. Use GetEditUrl for simple anchor tag href to the edit page for this record.

public abstract string GetEditLink(string contentName, string recordId, bool allowCut, string recordLabel, bool IsEditing)

Parameters

contentName string
recordId string
allowCut bool

If true and the content allows cut and paste, and cut icon will be included in the return string.

recordLabel string

Used as a caption for the label

IsEditing bool

If false, this call returns nothing. Set it true if IsEdiing( contentname ) is true.

Returns

string

Returns the edit-tab that should appear over the region to be edited.

public abstract string GetEditLink(string contentName, string recordId, bool allowCut, string recordLabel, bool IsEditing, string customCaption)

Parameters

contentName string
recordId string
allowCut bool
recordLabel string
IsEditing bool
customCaption string

Returns

string

Get the system edit link

public abstract string GetEditLink(string contentName, string recordGuid, string customCaption)

Parameters

contentName string
recordGuid string
customCaption string

Returns

string

GetEditUrl(int, int)

Get the url to the admin site edit page

public abstract string GetEditUrl(int contentId, int recordId)

Parameters

contentId int
recordId int

Returns

string

GetEditUrl(int, string)

Get the url to the admin site edit page

public abstract string GetEditUrl(int contentId, string recordGuid)

Parameters

contentId int
recordGuid string

Returns

string

GetEditUrl(string, int)

Get the url to the admin site edit page

public abstract string GetEditUrl(string contentName, int recordId)

Parameters

contentName string
recordId int

Returns

string

GetEditUrl(string, string)

Get the url to the admin site edit page

public abstract string GetEditUrl(string contentName, string recordGuid)

Parameters

contentName string
recordGuid string

Returns

string

GetEditWrapper(string)

wrap content in system editing region style without an edit link. This is just the dotted border

public abstract string GetEditWrapper(string innerHtml)

Parameters

innerHtml string

Returns

string

GetEditWrapper(string, int, int)

Wrap content in system editing region style and the edit link (edit icon and caption)

public abstract string GetEditWrapper(string innerHtml, int contentId, int recordId)

Parameters

innerHtml string
contentId int
recordId int

Returns

string

GetEditWrapper(string, int, int, string)

Wrap content in system editing region style and the edit link (edit icon and caption)

public abstract string GetEditWrapper(string innerHtml, int contentId, int recordId, string editCaption)

Parameters

innerHtml string
contentId int
recordId int
editCaption string

Returns

string

GetEditWrapper(string, int, string)

Wrap content in system editing region style and the edit link (edit icon and caption)

public abstract string GetEditWrapper(string innerHtml, int contentId, string recordGuid)

Parameters

innerHtml string
contentId int
recordGuid string

Returns

string

GetEditWrapper(string, int, string, string)

Wrap content in system editing region style and the edit link (edit icon and caption)

public abstract string GetEditWrapper(string innerHtml, int contentId, string recordGuid, string editCaption)

Parameters

innerHtml string
contentId int
recordGuid string
editCaption string

Returns

string

GetEditWrapper(string, string, int)

Wrap content in system editing region style and the edit link (edit icon and caption)

public abstract string GetEditWrapper(string innerHtml, string contentName, int recordId)

Parameters

innerHtml string
contentName string
recordId int

Returns

string

GetEditWrapper(string, string, int, string)

Wrap content in system editing region style and the edit link (edit icon and caption)

public abstract string GetEditWrapper(string innerHtml, string contentName, int recordId, string editCaption)

Parameters

innerHtml string
contentName string
recordId int
editCaption string

Returns

string

GetEditWrapper(string, string, string)

Wrap content in system editing region style and the edit link (edit icon and caption)

public abstract string GetEditWrapper(string innerHtml, string contentName, string recordGuid)

Parameters

innerHtml string
contentName string
recordGuid string

Returns

string

GetEditWrapper(string, string, string, string)

Wrap content in system editing region style and the edit link (edit icon and caption)

public abstract string GetEditWrapper(string innerHtml, string contentName, string recordGuid, string editCaption)

Parameters

innerHtml string
contentName string
recordGuid string
editCaption string

Returns

string

GetFieldProperty(string, string, string)

Deprecated, use GetFieldMeta and use the property

[Obsolete("Deprecated, use GetFieldMeta and use the property", false)]
public abstract string GetFieldProperty(string ContentName, string FieldName, string PropertyName)

Parameters

ContentName string
FieldName string
PropertyName string

Returns

string

GetID(string)

Returns the content id given its name

public abstract int GetID(string ContentName)

Parameters

ContentName string

Returns

int

GetLayout(int)

Returns the html layout field of a layout record

[Obsolete("Deprecated, use CP.Layout.GetLayout()", false)]
public abstract string GetLayout(int layoutId)

Parameters

layoutId int

Returns

string

GetLinkAliasByPageID(int, string, string)

Returns the primary link alias for the record id and querystringsuffix. If no link alias exists, it defaultvalue is returned.

public abstract string GetLinkAliasByPageID(int PageID, string QueryStringSuffix, string DefaultLink)

Parameters

PageID int
QueryStringSuffix string

In the case where an add-on is on the page, there may be many unique documents possible from the one pageid. Each possible variation is determined by values in the querystring added by the cpcore.addon. These name=value pairs in Querystring format are used to identify additional link aliases.

DefaultLink string

If no link alias is found, this value is returned.

Returns

string

Returns a linked icon to the admin list page for the content

public abstract string GetListLink(string ContentName)

Parameters

ContentName string

Returns

string

GetName(int)

Return the contentName from its id

public abstract string GetName(int contentId)

Parameters

contentId int

Returns

string

Return the appropriate link for a page.

public abstract string GetPageLink(int PageID)

Parameters

PageID int

Returns

string

Return the appropriate link for a page.

public abstract string GetPageLink(int PageID, string QueryStringSuffix)

Parameters

PageID int
QueryStringSuffix string

Returns

string

Return the appropriate link for a page.

[Obsolete("Deprecated. Use the method without AllowLinkAlias", false)]
public abstract string GetPageLink(int PageID, string QueryStringSuffix, bool AllowLinkAlias)

Parameters

PageID int
QueryStringSuffix string

If a link alias exists, this is used to lookup the correct alias. See GetLinkAliasByPageID for details. In other cases, this is added to the querystring.

AllowLinkAlias bool

Returns

string

GetProperty(string, string)

Deprecated. Use models to access record fields

[Obsolete("Deprecated. Use models to access record fields", false)]
public abstract string GetProperty(string ContentName, string PropertyName)

Parameters

ContentName string
PropertyName string

Returns

string

GetRecordGuid(string, int)

Return a records guid given its ID.

public abstract string GetRecordGuid(string ContentName, int RecordID)

Parameters

ContentName string
RecordID int

Returns

string

GetRecordID(string, string)

Return a record's ID given its name. If duplicates exist, the first one ordered by ID is returned.

public abstract int GetRecordID(string ContentName, string RecordName)

Parameters

ContentName string
RecordName string

Returns

int

GetRecordName(string, int)

Return a records name given its ID.

public abstract string GetRecordName(string ContentName, int RecordID)

Parameters

ContentName string
RecordID int

Returns

string

GetRecordName(string, string)

Return a records name given its guid.

public abstract string GetRecordName(string ContentName, string RecordGuid)

Parameters

ContentName string
RecordGuid string

Returns

string

GetTable(string)

Get the table used for a content definition.

public abstract string GetTable(string ContentName)

Parameters

ContentName string

Returns

string

GetTableID(string)

Return the recordId in the ccTables table for this table

public abstract int GetTableID(string tableName)

Parameters

tableName string

Returns

int

Deprecated, template link is not supported

[Obsolete("Deprecated, template link is not supported", false)]
public abstract string GetTemplateLink(int TemplateID)

Parameters

TemplateID int

Returns

string

IsChildContent(string, string)

Returns true if the childcontentid is a child of the parentcontentid

public abstract bool IsChildContent(string ChildContentID, string ParentContentID)

Parameters

ChildContentID string
ParentContentID string

Returns

bool

IsField(string, string)

Used to test if a field exists in a content definition

public abstract bool IsField(string ContentName, string FieldName)

Parameters

ContentName string
FieldName string

Returns

bool

IsLocked(string, string)

Returns true if the record is currently being edited.

public abstract bool IsLocked(string ContentName, string RecordID)

Parameters

ContentName string
RecordID string

Returns

bool

IsWorkflow(string)

workflow editing is deprecated

[Obsolete("workflow editing is deprecated", false)]
public abstract bool IsWorkflow(string ContentName)

Parameters

ContentName string

Returns

bool

PublishEdit(string, int)

workflow editing is deprecated

[Obsolete("workflow editing is deprecated", false)]
public abstract void PublishEdit(string ContentName, int RecordID)

Parameters

ContentName string
RecordID int

SetCopy(string, string)

Set a string in a 'Copy Content' record. The record will be created or modified.

public abstract void SetCopy(string CopyName, string Content)

Parameters

CopyName string
Content string

SubmitEdit(string, int)

workflow editing is deprecated

[Obsolete("workflow editing is deprecated", false)]
public abstract void SubmitEdit(string ContentName, int RecordID)

Parameters

ContentName string
RecordID int

getLayout(string)

Deprecated, use CP.Layout.GetLayoutByName()

[Obsolete("Deprecated, use CP.Layout.GetLayoutByName()", false)]
public abstract string getLayout(string layoutName)

Parameters

layoutName string

Returns

string

getLayout(string, string)

Deprecated, use CP.Layout.GetLayoutByName()

[Obsolete("Deprecated, use CP.Layout.GetLayoutByName()", false)]
public abstract string getLayout(string layoutName, string defaultLayout)

Parameters

layoutName string
defaultLayout string

Returns

string