Advertising the RSS Feed
As a final step, we need to provide a link so that users find the RSS feed. Since any section of the community website could be publishable, we do not want to modify each module to display the RSS feed link. Instead, we will modify a common control, the SectionTitle
control, which displays on every list of section content.
The SectionTitle
control lives in SectionTitle.cs
under the Controls
directory of Engine\Framework\ContentPages
. The control currently takes the Title
property of the current SectionInfo
object in Context
and writes the title out during the RenderContents
method. A slight modification will also add a hyperlink and an image representing our RSS feed:
public SectionTitle() : base() {
// assign default css class
CssClass = "sectionTitle";
// Get SectionInfo object
if (Context != null) {
SectionInfo objSectionInfo =
(SectionInfo)Context.Items["SectionInfo"];
_text = objSectionInfo.Title;
if(objSectionInfo.IsSectionWebService)
{
_text += String.Format...