Interface IContentController
IContentController provides the business layer of ContentItem.
Namespace: DotNetNuke.Entities.Content
Assembly: DotNetNuke.dll
Syntax
public interface IContentController
Examples
IContentController contentController = Util.GetContentController();
desktopModule.Content = desktopModule.FriendlyName;
desktopModule.Indexed = false;
desktopModule.ContentTypeId = contentType.ContentTypeId;
desktopModule.ContentItemId = contentController.AddContentItem(desktopModule);
Methods
| Improve this Doc View SourceAddContentItem(ContentItem)
Adds the content item.
Declaration
int AddContentItem(ContentItem contentItem)
Parameters
Type | Name | Description |
---|---|---|
ContentItem | contentItem | The content item. |
Returns
Type | Description |
---|---|
System.Int32 | content item id. |
See Also
| Improve this Doc View SourceAddMetaData(ContentItem, String, String)
Adds the meta data.
Declaration
void AddMetaData(ContentItem contentItem, string name, string value)
Parameters
Type | Name | Description |
---|---|---|
ContentItem | contentItem | The content item. |
System.String | name | The name. |
System.String | value | The value. |
See Also
| Improve this Doc View SourceDeleteContentItem(ContentItem)
Deletes the content item.
Declaration
void DeleteContentItem(ContentItem contentItem)
Parameters
Type | Name | Description |
---|---|---|
ContentItem | contentItem | The content item. |
See Also
| Improve this Doc View SourceDeleteContentItem(Int32)
Delete a ContentItem object by ID.
Declaration
void DeleteContentItem(int contentItemId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | contentItemId | The ID of the ContentItem object (ContentItemId). |
See Also
| Improve this Doc View SourceDeleteMetaData(ContentItem, String, String)
Deletes the meta data.
Declaration
void DeleteMetaData(ContentItem contentItem, string name, string value)
Parameters
Type | Name | Description |
---|---|---|
ContentItem | contentItem | The content item. |
System.String | name | The name. |
System.String | value | The value. |
See Also
| Improve this Doc View SourceDeleteMetaData(ContentItem, String)
Similar to DeleteMetaData that requires a value, but this one looks it up for you.
Declaration
void DeleteMetaData(ContentItem contentItem, string name)
Parameters
Type | Name | Description |
---|---|---|
ContentItem | contentItem | |
System.String | name |
See Also
| Improve this Doc View SourceGetContentItem(Int32)
Gets the content item.
Declaration
ContentItem GetContentItem(int contentItemId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | contentItemId | The content item id. |
Returns
Type | Description |
---|---|
ContentItem | content item. |
See Also
| Improve this Doc View SourceGetContentItemsByContentType(ContentType)
Get a list of content items by ContentType.
Declaration
IQueryable<ContentItem> GetContentItemsByContentType(ContentType contentType)
Parameters
Type | Name | Description |
---|---|---|
ContentType | contentType | The Content Type of the content items we want to query. |
Returns
Type | Description |
---|---|
IQueryable<ContentItem> | A queryable sequence of ContentItem instances. |
See Also
| Improve this Doc View SourceGetContentItemsByContentType(Int32)
Get a list of content items by ContentType ID.
Declaration
IQueryable<ContentItem> GetContentItemsByContentType(int contentTypeId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | contentTypeId | The Content Type ID of the content items we want to query. |
Returns
Type | Description |
---|---|
IQueryable<ContentItem> | A queryable sequence of ContentItem instances. |
See Also
| Improve this Doc View SourceGetContentItemsByModuleId(Int32)
Retrieve all content items associated with the specified module ID, moduleId
.
Declaration
IQueryable<ContentItem> GetContentItemsByModuleId(int moduleId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | moduleId | The module ID to use in the content item lookup. |
Returns
Type | Description |
---|---|
IQueryable<ContentItem> | A queryable sequence of ContentItem instances. |
See Also
| Improve this Doc View SourceGetContentItemsByTabId(Int32)
Retrieve all content items on the specified page (tab).
Declaration
IQueryable<ContentItem> GetContentItemsByTabId(int tabId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tabId | The page ID to use in the lookup of content items. |
Returns
Type | Description |
---|---|
IQueryable<ContentItem> | A queryable sequence of ContentItem instances. |
See Also
| Improve this Doc View SourceGetContentItemsByTerm(Term)
Return ContentItems that have the specified term attached.
Declaration
IQueryable<ContentItem> GetContentItemsByTerm(Term term)
Parameters
Type | Name | Description |
---|---|---|
Term | term |
Returns
Type | Description |
---|---|
IQueryable<ContentItem> | A queryable sequence of ContentItem instances. |
See Also
| Improve this Doc View SourceGetContentItemsByTerm(String)
Return ContentItems that have the specified term attached.
Declaration
IQueryable<ContentItem> GetContentItemsByTerm(string term)
Parameters
Type | Name | Description |
---|---|---|
System.String | term |
Returns
Type | Description |
---|---|
IQueryable<ContentItem> | A queryable sequence of ContentItem instances. |
See Also
| Improve this Doc View SourceGetContentItemsByTerms(IList<Term>)
Return a list of ContentItems that have all of the specified terms attached.
Declaration
IQueryable<ContentItem> GetContentItemsByTerms(IList<Term> terms)
Parameters
Type | Name | Description |
---|---|---|
IList<Term> | terms | A list of terms that should be attached to the ContentItems returned. |
Returns
Type | Description |
---|---|
IQueryable<ContentItem> | A queryable sequence of ContentItem instances. |
See Also
| Improve this Doc View SourceGetContentItemsByTerms(String[])
Return a list of ContentItems that have all of the specified terms attached.
Declaration
IQueryable<ContentItem> GetContentItemsByTerms(string[] terms)
Parameters
Type | Name | Description |
---|---|---|
System.String[] | terms |
Returns
Type | Description |
---|---|
IQueryable<ContentItem> | A queryable sequence of ContentItem instances. |
See Also
| Improve this Doc View SourceGetContentItemsByVocabularyId(Int32)
Get a list of content items tagged with terms from the specified Vocabulary ID.
Declaration
IQueryable<ContentItem> GetContentItemsByVocabularyId(int vocabularyId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | vocabularyId |
Returns
Type | Description |
---|---|
IQueryable<ContentItem> | A queryable sequence of ContentItem instances. |
See Also
| Improve this Doc View SourceGetMetaData(Int32)
Gets the meta data.
Declaration
NameValueCollection GetMetaData(int contentItemId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | contentItemId | The content item id. |
Returns
Type | Description |
---|---|
NameValueCollection | A |
See Also
| Improve this Doc View SourceGetUnIndexedContentItems()
Gets the un indexed content items.
Declaration
IQueryable<ContentItem> GetUnIndexedContentItems()
Returns
Type | Description |
---|---|
IQueryable<ContentItem> | content item collection. |
See Also
| Improve this Doc View SourceUpdateContentItem(ContentItem)
Updates the content item.
Declaration
void UpdateContentItem(ContentItem contentItem)
Parameters
Type | Name | Description |
---|---|---|
ContentItem | contentItem | The content item. |