• Share
    • Twitter
    • LinkedIn
    • Facebook
    • Email
  • Feedback
  • Improve this Doc

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 Source

AddContentItem(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
GetContentController()
| Improve this Doc View Source

AddMetaData(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
GetContentController()
| Improve this Doc View Source

DeleteContentItem(ContentItem)

Deletes the content item.

Declaration
void DeleteContentItem(ContentItem contentItem)
Parameters
Type Name Description
ContentItem contentItem

The content item.

See Also
GetContentController()
| Improve this Doc View Source

DeleteContentItem(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
GetContentController()
| Improve this Doc View Source

DeleteMetaData(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
GetContentController()
| Improve this Doc View Source

DeleteMetaData(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
GetContentController()
| Improve this Doc View Source

GetContentItem(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
GetContentController()
| Improve this Doc View Source

GetContentItemsByContentType(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
GetContentController()
| Improve this Doc View Source

GetContentItemsByContentType(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
GetContentController()
| Improve this Doc View Source

GetContentItemsByModuleId(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
GetContentController()
| Improve this Doc View Source

GetContentItemsByTabId(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
GetContentController()
| Improve this Doc View Source

GetContentItemsByTerm(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
GetContentController()
| Improve this Doc View Source

GetContentItemsByTerm(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
GetContentController()
| Improve this Doc View Source

GetContentItemsByTerms(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
GetContentController()
| Improve this Doc View Source

GetContentItemsByTerms(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
GetContentController()
| Improve this Doc View Source

GetContentItemsByVocabularyId(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
GetContentController()
| Improve this Doc View Source

GetMetaData(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 containing the content item's metadata.

See Also
GetContentController()
| Improve this Doc View Source

GetUnIndexedContentItems()

Gets the un indexed content items.

Declaration
IQueryable<ContentItem> GetUnIndexedContentItems()
Returns
Type Description
IQueryable<ContentItem>

content item collection.

See Also
GetContentController()
| Improve this Doc View Source

UpdateContentItem(ContentItem)

Updates the content item.

Declaration
void UpdateContentItem(ContentItem contentItem)
Parameters
Type Name Description
ContentItem contentItem

The content item.

See Also
GetContentController()

Extension Methods

JsonExtensionsWeb.ToJson(Object)

See Also

GetContentController()
  • View Source
Back to top by the community, for the community... #DNNCMS