Working with selectors Part One: Content selector, Image selector, Document selector.

Working with selectors Part One: Content selector, Image selector, Document selector.

December 26, 2008 0 Comments

The content you're reading is getting on in years
This post is on the older side and its content may be out of date.
Be sure to visit our blogs homepage for our latest news, updates and information.

 

I'm going to start a session of some posts about selectors in Sitefinity. There won't be a lot of coding, because I will describe some general aspects of the topic. In this post I will work with user control and selectors will be set as a properties of this control.

We will define selectors in the code behind of our user control.

1. Content selector.

 WebEditor1

Content Selector

As a result the Guid of a selected item will be returned. You can browse from Generic_Content, News,

Blogs, Images and Documents, Events.

#region Properties
 
 //content selector 
    [WebEditor("Telerik.Cms.Engine.WebControls.ContentSelector, Telerik.Cms.Engine")]
 public Guid SelectContent
    {
 get 
        {
 return this.selectContent;
        }
 set 
        {
 this.selectContent = value;
        }
    }
 //declare Provider Name property 
 public virtual string ProviderName
    {
 get 
        {
 return this.providerName;
        }
 set 
        {
 this.providerName = value;
        }
    }
 
 private Guid selectContent;
 private string providerName = string.Empty;
 
#endregion

 

2. Image and document selectors

 

WebEditor2

Image selector

 

WebEditor3

Document Selector

 

 //image selector 
    [WebEditor("Telerik.Libraries.WebControls.ImageSelector, Telerik.Libraries")]
 public string SelectImage
    {
 get 
        { return this.image; }
 set 
        { this.image = value; }
    }
 private string image;
 
 //document selector 
   [WebEditor("Telerik.Libraries.WebControls.DocumentsSelector, Telerik.Libraries")]
 public string SelectDoc
    {
 get 
        { return this.doc; }
 set 
        { this.doc = value; }
    }
 private string doc;

 

selector1

 

Coming soon Part 2 - file manager selector, page id selector, rss feed selector

progress-logo

The Progress Guys

View all posts from The Progress Guys on the Progress blog. Connect with us about all things application development and deployment, data integration and digital business.

Comments
Comments are disabled in preview mode.
Topics
 
 
Latest Stories in
Your Inbox
Subscribe
More From Progress
d12fcc0bdb669b804e7f71198c9619a7
5 Questions Automakers Should Ask to Improve Asset Uptime
Download Whitepaper
 
SF_MQ_WCM
2018 Gartner Magic Quadrant Web Content Management (WCM)
Download Whitepaper
 
What-Serverless-Means-For-Enterprice-Apps-Kinvey
What Serverless Means for Enterprise Apps
Watch Webinar