Try Now
More in this section
Blogs RSS feed

Working with selectors(WebEditors) part 3. Blog selector and Newsletters group selector.

by Ivan Dimitrov

1. Blog selector( web editor)

This web editor is useful if you want to select some of the blogs you have already created.


Here we are creating an user control where we add BlogPosts control.


<%@ Control Language="C#" AutoEventWireup="true" CodeFile="WebEditor.ascx.cs" Inherits="CustomControls_WebEditor" %> 
<%@ Register Assembly="Telerik.Blogs" Namespace="Telerik.Blogs.WebControls" TagPrefix="blogs" %> 
<blogs:BlogPosts ID="BlogPosts1" runat="server" ParentIDs="" />


We put the WebEditor in the code behind and use the value to show our blog. Under methods

region you can create a new instance of BlogManager and pass the ID of the WebEditor.


using System;
using System.Web.UI;
using Telerik.Cms.Web.UI;
using System.ComponentModel;
using Telerik.Rss;
using Telerik.Framework.Web.Design;
using Telerik.Cms.Engine;
using Telerik.Cms;
using Telerik.Blogs;
public partial class CustomControls_WebEditor : System.Web.UI.UserControl, ITextControl
    #region Methoods
 protected void Page_Load(object sender, EventArgs e)
 if (selectedBlogs != null)
            BlogManager ctman = new BlogManager();
            IBlog blog = ctman.GetBlog(selectedBlogs[0]);
            BlogPosts1.ParentIDs = selectedBlogs;
    #region Properties
    [TypeConverter("Telerik.Blogs.WebControls.SelectedBlogsConverter, Telerik.Blogs")]
    [WebEditor("Telerik.Blogs.WebControls.BlogsSelector, Telerik.Blogs")]
 public Guid[] SelectedBlogs
 return this.selectedBlogs;
 this.selectedBlogs = value;
 private Guid[] selectedBlogs;







As a result a Guid is returned.


2.Newsletters group selector - it returns all newsletter groups you have already created.


[WebEditor("Telerik.Notifications.Newsletters.WebControl.GroupSelectionList, Telerik.Notifications")]
    [TypeConverter("Telerik.Framework.Utilities.GuidArrayConverter, Telerik.Framework")]
 public Guid[] SubscriberGroups
 get { return subscriberGroups; }
 set { subscriberGroups = value; }
 private Guid[] subscriberGroups;




As a result a Guid is returned.


Leave a comment
  1. Colin Bowern Feb 16, 2009
    How about one of these fancy selectors for the forums too? :)

    On a related note there was a comment a few releases back to focus on the CMS versus the modules.  I'm starting to see some inconsistencies in module functionality with examples like this.  It would be great to split efforts into a core CMS development and modules.  Work on the modules on a different release cycle and publish them to a marketplace in a manner similar to Firefox addons.  That way we can offer up our own implementations of these modules.
  2. Paul Markham Sep 24, 2009
    Is there a search index selector?
  3. multiple choice questions with answers Nov 27, 2012
    Nothing is more absolutely frustrating to
    any person than needing to write one's thoughts clearly and concisely on paper,
    in the form of a personal letter to a friend or loved one, a statement of
    purpose required in a university application, a professional summation of job
    performance required by a manager, or an essay, research paper, or thesis
    required by a high school instructor or college professor for a course grade,
    and not having the fundamental skills to do so.

    Leave a comment