Kentico CMS 7.0 Intranet Administrator's Guide

RSS feeds

RSS feeds

Previous topic Next topic Mail us feedback on this topic!  

RSS feeds

Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic!  

The portal contains numerous RSS feeds of blog posts, events, forum posts and news published in the portal's global section and in each department's and workgroup's dedicated website section. The feeds are created using web parts of the Syndication module. A full reference on the module can be found in Developer's Guide -> Modules -> Syndication. In Intranet User's Guide -> Other features -> RSS feeds, you can find a detailed summary of the available feeds and an explanation of how the feeds can be used by live site users.

 

RSS feeds in the content tree

 

The RSS feeds are provided by a set of dedicated special pages. These special pages can be found at three locations:

 

1) RSS feed pages for the content of the portal's global section are located under the RSS document in the root of the content tree, as depicted below.

 

intranetadminguide_clip0115

 

2) RSS feed pages for content of particular department sections are located under the RSS document in each department's dedicated website section.

 

intranetadminguide_clip0117

 

3) RSS feed pages for content of particular workgroup section are located under the RSS document in each workgroup's dedicated website section.

 

intranetadminguide_clip0118

 

RSS feed web part configuration

 

RSS pages of news, event and blog post feeds contain two interconnected web parts: a Documents data source and an RSS repeater.

 

The Documents data source is used to retrieve data records for the feed from the system's database and provide them to the RSS repeater. From all its properties, the following are configured to ensure the required functionality (the sample values are taken from the Departments/IT/RSS/Blog posts page):

 

Web part control ID: DocumentsDataSource; code name of the data source (used for connection to the RSS repeater).

Path: {%cmscontext.currentdepartment.nodealiaspath%}/Blogs/%; documents under this path will be provided by the datasource. The macro is used to retrieve the alias path of the current department's parent document.

Class names: CMS.BlogPost; only documents of this type located in the specified path will be provided by the datasource.

ORDER BY Expression: BlogPostDate DESC; ordering of provided documents.

Select top N documents: 15; only the 15 top documents will be provided (based on the ORDER BY expression sorting).

 

The RSS repeater ensures that the page becomes the actual RSS feed, i.e. that the URL of the page will be the actual URL of the feed. From its properties, the following are configured to ensure the required behavior:

 

Feed name: blogposts; name of the feed used for its identification (typically used if you have more than one feed on a single page).

Feed title: Latest {%cmscontext.currentdepartment.documentname%} department blog posts; title of the feed. The macro is used to retrieve the name of the current department.

Feed description: Latest {%cmscontext.currentdepartment.documentname%} department blog posts RSS feed.; text describing the feed. The macro is used to retrieve the name of the current department.

Data source name: DocumentsDataSource; code name of the datasource that provides documents for the feed.

Transformation name: IntranetPortal.Transformations.SecuredBlogPostRSSItem; transformation used to transform provided documents to the feed format.

 

intranetadminguide_clip0119

 

Forum post RSS feed pages are created in a similar manner. They also contain an RSS repeater, but the data is provided to it by a Forum posts data source instead of the Documents data source described above. However, configuration of the web parts is very similar.

 

The Forum posts data source has its properties configured the following way (the sample values are taken from the Departments/IT/RSS/Forum posts page):

 

Web part control ID: ForumPostsDataSource; code name of the data source (used for connection to the RSS repeater).

Forum name: all; ensures that posts from all forums on the site should be provided, the posts are then filtered using the WHERE condition below.

Select only approved: enabled; ensures that only approved posts will be provided (in case that forum moderation is enabled).

ORDERY BY expression: PostLastModified DESC;

Select Top N posts: 15;

WHERE condition: GroupName = 'Department_{%cmscontext.currentdepartment.nodeguid%}';

Select columns: PostGUID,PostSubject,PostIDPath,PostForumID,ForumSiteID;

 

The RSS repeater has the following properties configuration:

 

Feed name: forumposts; name of the feed used for its identification (typically used if you have more than one feed on a single page).

Feed title: Latest {%cmscontext.currentdepartment.documentname%} department forum posts; title of the feed. The macro is used to retrieve the name of the current department.

Feed description: Latest {%cmscontext.currentdepartment.documentname%} department forum posts RSS feed.; text describing the feed. The macro is used to retrieve the name of the current department.

Data source name: ForumPostsDataSource; code name of the datasource that provides documents for the feed.

Transformation name: IntranetPortal.Transformations.SecuredForumPostsRSSItem; transformation used to transform provided documents to the feed format.

 

intranetadminguide_clip0133

 

Links to RSS feeds

 

Links to particular RSS feeds can be found throughout the whole portal. The first location where you may come across them are the Home pages, both the global one and the ones of departments and workgroups. The feeds are accessible under the RSS_blue icons in widgets displaying latest news, blog posts and forum posts (only on department and workgroup Home pages). Displaying of these links is ensured by the code of the Intranet content box RSS and Intranet column box RSS web part containers, which are used to encapsulate the web parts.

 

intranetadminguide_clip0116

 

The other location where links to RSS feeds can be found are the particular News, Events, Forums and Blogs pages, both in the portal's global section and in particular department and workgroup sections. On the Forums page, the feed is accessible under the RSS_blue icon in the web part container of the Latest posts repeater, similarly as described above.

 

intranetadminguide_clip0127

 

On the other pages, the respective feeds are accessible under the RSS icon next to the page's title (as highlighted above). This time, the link is added to the page using the Feed link web part, whose Feed URL property is configured to the path of the respective feed's page (e.g. ~/RSS/News.aspx in case of the global section's news).

 

intranetadminguide_clip0126

 

Security of department and workgroup feeds

 

RSS feeds of department or workgroup content contain only titles of the new content. These titles work as links to the page where the new content is published. This happens for security reasons, as RSS feeds cannot be secured and anybody who knows the feed URL can subscribe to it. To prevent users without appropriate permissions from viewing secured content, only links are included in the feeds. This way, users have to log on to the secured portal to see the actual content.

 

intranetadminguide_clip0130