Return to doc.sitecore.com

Documentation (Sitecore 5.1.1)

A blog is a website with regularly posted Items, which are displayed in reverse chronological order.

This module is a sample Blog engine built in Sitecore environment. It consists of the Blog Administrator portlet for editing the posts from the back-end and provides simple front-end interface for interacting with extranet users.

1.  Installation Guide

The Blog module is distributed as a standard Sitecore package. Thus to start using it, you should install the package. Please refer to the Installing Modules and Packages article if you are not familiar with the standard Sitecore Packager tool.  

The package installs the following Items:

1.1.  Web.config Changes

<references> section

Add a reference to blogportlet.dll into the <references> section of the web.config file as follows:

<references>

   ...

   <reference>/bin/blogportlet.dll</reference>

   ...

</references>

<sites> section

Add the Blog site into the <sites> section before the 'website' definition:

<sites>

...

<site

         name="blog"

         virtualFolder="/blog"

         physicalFolder="/sitecore modules/blog"

         rootPath="/sitecore/content"

         startItem="/blogroot"

         language="en"

         database="master"

         content="master"

         domain="blog"

         allowDebug="true"

         cacheHtml="true"

         htmlCacheSize="10MB"

         enablePreview="true"

         enableDebugger="true" />

...

</sites>

<xslExtensions> section

Add Blog Utils xsl extention into the <xslExtensions> section:

<xslExtensions>

...

<extension mode="on" type="BlogSite.BlogUtils, BlogSite" namespace="http://www.sitecore.net/blogutils" singleInstance="true" />

...

</xslExtensions>

Mail Server setting

In order to receive a mail notification when a comment is posted, set a Mail Server setting in your web.config file:

<setting name="MailServer" value="your.mail.server"/>

<domains> section

Add a domain into the <domains> section:

<domain id="blog" singleInstance="true" type="Sitecore.Modules.Blog.BlogDomain, BlogLib">

        <param desc="name">$(id)</param>

        <param desc="database">extranet</param>

</domain>

httprequestbegin pipeline

Add the following processors to the httprequestbegin pipeline.

It is important to add the processor into the right place, afterLayoutResolver and before the ExecuteRequest processor.

<httpRequestBegin>

   ...

   <processor type="Sitecore.Pipelines.HttpRequest.LayoutResolver, Sitecore.Kernel" />

   <processor type="Sitecore.Modules.RSS.HttpRequest, Sitecore.Modules.RSS" />

   <processor type="Sitecore.Pipelines.HttpRequest.ExecuteRequest, Sitecore.Kernel" />

   ...

</httpRequestBegin>

2.  User Manual

The instructions below show how to create a first blog post and how to manage blogs.

2.1.  Setting up the Blog Portlet

Start the Sitecore Today application (Sitecore » Sitecore Today). Move the mouse pointer to the right to activate the Portal panel, click 'Add Content', check 'Blog' and click the 'Apply ' button in order to add the Blog section into the Sitecore Today application.


The Blogs section will appear in Sitecore Today:

2.2.  Creating a Blog

Click the 'Create Blog' button in the Blog section.

Enter your blog display name:

Click the newly created blog title to start the Blog Administrator application.

2.3.  Blog Administrator Application

The Blog Administrator Application is used to create and manage posts and blogs.

2.3.1.  Blog Administrator Interface

The Blog Administrator application consists of the following components:

Menu buttons:

Title
Enter the post tile here

Post Editor
Rich Text Editor used in Sitecore Client is implemented here as well. A post may contain any valid HTML code.

Category Editor
Used to create categories for the posts.

Available Categories
A list of available categories.

Comments
A list of comments for the current post.
Right-click on a comment to call a context menu:

Select Delete Comment to delete a comment or View Comment to view it.

A List of Posts
All posts of the currently selected blog are listed here.
Double-click on a post to open it in the Editor. Right-click on a post and choose Delete Post from the context menu to delete it.

2.3.2.  Managing Posts

It is required that every post belongs to a specific category. Thus, you should create at least one category before adding a post.

Adding a Category:
Right click one of the Categories item and choose 'Add Category' from the context menu. Enter the name of the new category and click OK.

The newly created subcategory will be added under the category Item you selected.

Renaming and Deleting Categories
Right click a category and choose appropriate option from the context menu (see the picture above).

Adding a Post

Click the 'New Post' button on the toolbar.

Enter Post title and content.

Check appropriate categories the list of available categories.

Click 'Create Post' toolbar button.

A post will be created and its title will be added to the post list.

Browsing Posts

Select a category in the Categories list to view the posts which belong to the selected category.

All posts are also available under the BlogRoot Item in the content tree:

Editing Existing Posts

Double-click on a post to open it in the Editor. Right-click on a post and choose Delete Post from the context menu to delete it.

2.4.  Deleting a Blog

Click 'Delete Blog' toolbar button and confirm your decision to delete a blog.

2.5.  Customizing Blog Layouts

Custom Layouts and renderings should be set in the 'Layout' section of the blog templates.

2.6.  Blog on the Front-End

To view the blog, type the following URL in the browser’s address bar: http://(yourdomain)/blog

The Blog consists of the following sections:

The Post List

The Post list is located to the left. Every post Item consists of the following:

Blog List

All available blogs are listed in the Blogs section to the right.

Calendar

Use this section to navigate between posts created on different dates.

Categories

A list of available categories.

Administration

This section is used to perform log in/log out operations and to create new blogs.

2.6.1.  Creating a New User Account

It is possible to create a new user account from the Administration section. The Create a New Account button is visible until a User logs in:

2.6.2.  Adding Comments

Click the Comments button to add a comment to a post