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
Methods
AbortEdit(string, int)
workflow editing is deprecated
[Obsolete("workflow editing is deprecated", false)]
public abstract void AbortEdit(string ContentName, int RecordId)
Parameters
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
ContentNamestring
Returns
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
Returns
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
Returns
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
ContentNamestringFieldNamestringfieldTypeIdCPContentBaseClass.FieldTypeIdEnum
Returns
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
ContentNamestringFieldNamestringfileTypeEnumCPContentBaseClass.fileTypeIdEnum
Returns
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
Returns
AddRecord(object)
Deprecated, use AddRecord(string)
[Obsolete("Deprecated, use AddRecord(string)", false)]
public abstract int AddRecord(object ContentName)
Parameters
ContentNameobject
Returns
AddRecord(string)
Inserts a record and returns the Id for the record
public abstract int AddRecord(string ContentName)
Parameters
ContentNamestring
Returns
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
Returns
ApproveEdit(string, int)
workflow editing is deprecated
[Obsolete("workflow editing is deprecated", false)]
public abstract void ApproveEdit(string ContentName, int RecordId)
Parameters
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
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
ContentNamestring
GetAddLink(int)
Get an icon linked to the administration site which adds a new record to the content.
public abstract string GetAddLink(int contentId)
Parameters
contentIdint
Returns
GetAddLink(int, 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
Returns
GetAddLink(int, string, bool)
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
contentIdintpresetNameValueListstringincludeChildContentboolIf true, return a crlf delimited list of add tags, including add links for child content
Returns
GetAddLink(string)
Get an icon linked to the administration site which adds a new record to the content.
public abstract string GetAddLink(string contentName)
Parameters
contentNamestring
Returns
GetAddLink(string, 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
Returns
GetAddLink(string, string, bool, bool)
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
contentNamestringpresetNameValueListstringA comma delimited list of name=value pairs. Each name is a field name and the value is used to prepopulate the new record.
allowPasteboolIf true and the content supports cut-paste from the public site, the returned string will include a cut icon.
isEditingboolIf false, this call returns nothing. Set it true if IsEdiing( contentname ) is true.
Returns
GetAddLink(string, string, bool, bool, bool)
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
contentNamestringpresetNameValueListstringA comma delimited list of name=value pairs. Each name is a field name and the value is used to prepopulate the new record.
allowPasteboolIf true and the content supports cut-paste from the public site, the returned string will include a cut icon.
isEditingboolIf false, this call returns nothing. Set it true if IsEdiing( contentname ) is true.
includechildContentboolIf true, return a crlf delimited list of add tags, including add links for child content
Returns
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
contentNamestring
Returns
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
CopyNamestring
Returns
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
Returns
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
Returns
GetDataSource(string)
Returns the datasource name of the content given.
public abstract string GetDataSource(string ContentName)
Parameters
ContentNamestring
Returns
GetEditLink(int, int)
Get the system edit link
public abstract string GetEditLink(int contentId, int recordId)
Parameters
Returns
GetEditLink(int, int, string)
Get the system edit link
public abstract string GetEditLink(int contentId, int recordId, string customCaption)
Parameters
Returns
GetEditLink(int, string)
Get the system edit link
public abstract string GetEditLink(int contentId, string recordGuid)
Parameters
Returns
GetEditLink(int, string, string)
Get the system edit link
public abstract string GetEditLink(int contentId, string recordGuid, string customCaption)
Parameters
Returns
GetEditLink(string, int)
Get the system edit link
public abstract string GetEditLink(string contentName, int recordId)
Parameters
Returns
GetEditLink(string, int, string)
Get the system edit link
public abstract string GetEditLink(string contentName, int recordId, string customCaption)
Parameters
Returns
GetEditLink(string, string)
Get the system edit link
public abstract string GetEditLink(string contentName, string recordGuid)
Parameters
Returns
GetEditLink(string, string, bool, string, bool)
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
contentNamestringrecordIdstringallowCutboolIf true and the content allows cut and paste, and cut icon will be included in the return string.
recordLabelstringUsed as a caption for the label
IsEditingboolIf false, this call returns nothing. Set it true if IsEdiing( contentname ) is true.
Returns
GetEditLink(string, string, bool, string, bool, 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
contentNamestringrecordIdstringallowCutboolrecordLabelstringIsEditingboolcustomCaptionstring
Returns
GetEditLink(string, string, string)
Get the system edit link
public abstract string GetEditLink(string contentName, string recordGuid, string customCaption)
Parameters
Returns
GetEditUrl(int, int)
Get the url to the admin site edit page
public abstract string GetEditUrl(int contentId, int recordId)
Parameters
Returns
GetEditUrl(int, string)
Get the url to the admin site edit page
public abstract string GetEditUrl(int contentId, string recordGuid)
Parameters
Returns
GetEditUrl(string, int)
Get the url to the admin site edit page
public abstract string GetEditUrl(string contentName, int recordId)
Parameters
Returns
GetEditUrl(string, string)
Get the url to the admin site edit page
public abstract string GetEditUrl(string contentName, string recordGuid)
Parameters
Returns
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
innerHtmlstring
Returns
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
Returns
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
Returns
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
Returns
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
Returns
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
Returns
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
Returns
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
Returns
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
Returns
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
Returns
GetID(string)
Returns the content id given its name
public abstract int GetID(string ContentName)
Parameters
ContentNamestring
Returns
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
layoutIdint
Returns
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
PageIDintQueryStringSuffixstringIn 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.
DefaultLinkstringIf no link alias is found, this value is returned.
Returns
GetListLink(string)
Returns a linked icon to the admin list page for the content
public abstract string GetListLink(string ContentName)
Parameters
ContentNamestring
Returns
GetName(int)
Return the contentName from its id
public abstract string GetName(int contentId)
Parameters
contentIdint
Returns
GetPageLink(int)
Return the appropriate link for a page.
public abstract string GetPageLink(int PageID)
Parameters
PageIDint
Returns
GetPageLink(int, string)
Return the appropriate link for a page.
public abstract string GetPageLink(int PageID, string QueryStringSuffix)
Parameters
Returns
GetPageLink(int, string, bool)
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
PageIDintQueryStringSuffixstringIf 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.
AllowLinkAliasbool
Returns
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
Returns
GetRecordGuid(string, int)
Return a records guid given its ID.
public abstract string GetRecordGuid(string ContentName, int RecordID)
Parameters
Returns
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
Returns
GetRecordName(string, int)
Return a records name given its ID.
public abstract string GetRecordName(string ContentName, int RecordID)
Parameters
Returns
GetRecordName(string, string)
Return a records name given its guid.
public abstract string GetRecordName(string ContentName, string RecordGuid)
Parameters
Returns
GetTable(string)
Get the table used for a content definition.
public abstract string GetTable(string ContentName)
Parameters
ContentNamestring
Returns
GetTableID(string)
Return the recordId in the ccTables table for this table
public abstract int GetTableID(string tableName)
Parameters
tableNamestring
Returns
GetTemplateLink(int)
Deprecated, template link is not supported
[Obsolete("Deprecated, template link is not supported", false)]
public abstract string GetTemplateLink(int TemplateID)
Parameters
TemplateIDint
Returns
IsChildContent(string, string)
Returns true if the childcontentid is a child of the parentcontentid
public abstract bool IsChildContent(string ChildContentID, string ParentContentID)
Parameters
Returns
IsField(string, string)
Used to test if a field exists in a content definition
public abstract bool IsField(string ContentName, string FieldName)
Parameters
Returns
IsLocked(string, string)
Returns true if the record is currently being edited.
public abstract bool IsLocked(string ContentName, string RecordID)
Parameters
Returns
IsWorkflow(string)
workflow editing is deprecated
[Obsolete("workflow editing is deprecated", false)]
public abstract bool IsWorkflow(string ContentName)
Parameters
ContentNamestring
Returns
PublishEdit(string, int)
workflow editing is deprecated
[Obsolete("workflow editing is deprecated", false)]
public abstract void PublishEdit(string ContentName, int RecordID)
Parameters
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
SubmitEdit(string, int)
workflow editing is deprecated
[Obsolete("workflow editing is deprecated", false)]
public abstract void SubmitEdit(string ContentName, int RecordID)
Parameters
getLayout(string)
Deprecated, use CP.Layout.GetLayoutByName()
[Obsolete("Deprecated, use CP.Layout.GetLayoutByName()", false)]
public abstract string getLayout(string layoutName)
Parameters
layoutNamestring
Returns
getLayout(string, string)
Deprecated, use CP.Layout.GetLayoutByName()
[Obsolete("Deprecated, use CP.Layout.GetLayoutByName()", false)]
public abstract string getLayout(string layoutName, string defaultLayout)