The Blogs module allows users to easily create and manage blog items. The Blog module provides the Blog Posts control which displays blogs. This topic
provides information of how to use the BlogManager class.
A blog item is a container for blog posts which contain text. Most BlogManager methods provide functionality to manage blog items. Posts, on the other
hand have the functionality of a content item and that is why the Blogs module is based on Generic Content. Most methods needed to manage posts are actually methods
of the ContentManager class.
The Content property of the BlogManager class is the instance of ContentManager instantiated with a proper provider for
Blogs. While all Generic Content based modules (such as Blogs, Events, News, and so on) are using the ContentManager class for most of their data-related work, it
is necessary that ContentManager is instantiated through the respective module's Content property, and not directly through ContentManager's
constructor.
How to Start Using the BlogManager Class
You can create a new instance of the BlogManager class anywhere in your code in order to work with Blogs module data. If working in an
assembly, make sure you reference the Telerik.Blogs assembly before you use the BlogManager class.
In order to start using Blogs module API, create a new instance of the BlogManager class:
Create a new instance of BlogManager with specified provider name:
|
Copy Code |
|
// creates new instance of BlogManager class with provider name as parameter,
// which means that BlogManager will use specified provider when working with data Telerik.Forums.BlogManager blogManager
= new Telerik.Forums.BlogManager("MyCustomProvider");
|
Content
Following are the topics that explain how to work with different methods of BlogManager :
Blog Items:
Post Items:
See Also