More in this section

Forums / Developing with Sitefinity / Contentplaceholder in UserControl

Contentplaceholder in UserControl

9 posts, 0 answered
  1. Kwinten Volckaert
    Kwinten Volckaert avatar
    41 posts
    Registered:
    01 Mar 2005
    23 Jan 2009
    Link to this post
    Is it possible to create an usercontrol where I define places where you can insert other controls?
    I am mainly thinking of a layout where one can insert some text, title or images, or an image library control...
    this way I don't have to create an immense collection of masterpages
  2. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    23 Jan 2009
    Link to this post
    Hello Kwinten Volckaert,

    This functionality is still not available. The ContentPlaceHolders, on which you can drop your controls from the UI, are support only for the master pages.

    Kind regards,
    Georgi
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. Kwinten Volckaert
    Kwinten Volckaert avatar
    41 posts
    Registered:
    01 Mar 2005
    23 Jan 2009
    Link to this post
    Ok, is there a way I could use the radeditor in the properties of my control...simular to the generic content control?
  4. Gabe Sumner
    Gabe Sumner avatar
    440 posts
    Registered:
    09 Sep 2007
    23 Jan 2009
    Link to this post
    Absolutely!  Just create a Control Designer for your custom control and put an instance of the RadEditor on it:

    http://www.sitefinity.com/help/developer-manual/control-adding-controls-designers.html

    I am planning to explore this subject on my blog next week.  Until then, the instructions above should help.

    Gabe Sumner
    http://www.sitefinitywatch.com/
  5. Kwinten Volckaert
    Kwinten Volckaert avatar
    41 posts
    Registered:
    01 Mar 2005
    23 Jan 2009
    Link to this post
    I found the link allready and tried it out with some textboxes and a checkbox (wether or not to show a title above a block of text). I cna see a designer which is designed very poorely but I can't seem to save anything...

    I'll keep an eye out on your blog!!!! Hope you can point out some things more clearly then the bulletlist example
  6. Kwinten Volckaert
    Kwinten Volckaert avatar
    41 posts
    Registered:
    01 Mar 2005
    27 Jan 2009
    Link to this post
    I still can't seem to make this work. I can't seem to save anything I put in the basic tab panel.
    I want the following controls there...
    - a Textbox for a title
    - a checkbox to sleect if you want to show the title or not
    - a radeditor for the textblock itself

    For now I use 2 textboxes insteat of the radeditor to simplify things, but even then I get stuck
  7. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    27 Jan 2009
    Link to this post
    Hello Kwinten Volckaert,

    I am not sure what is wrong with your control from the explanations given. Do you get any errors? What is the behavior? Also, have you managed to run our examples of implementing designers?

    Kind regards,
    Georgi
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  8. Rob
    Rob avatar
    4 posts
    Registered:
    08 Feb 2009
    11 Feb 2009
    Link to this post
    Hi

    Have you had any luck getting your control to work?

    I'm wanting to put a radeditor on a control, but figured i'd follow the steps in the developer manual, but on the last page (control-adding-controls-designers.html)  the control fails with "The type or namespace name 'ILinksList' could not be found (are you missing a using directive or an assembly reference?)"

    Any ideas?

  9. Parvan
    Parvan avatar
    151 posts
    Registered:
    24 Sep 2012
    11 Feb 2009
    Link to this post
    Hello web,

    To fix the problem with this example add this interface(ILinksList) to your site's App_Code folder:
    using System;  
    using System.Collections.Generic;  
    using System.Web;  
    using System.Web.UI.WebControls;  
     
    /// <summary>  
    /// Summary description for ILinksList  
    /// </summary>  
    public interface ILinksList  
    {  
        string ControlTitle{get;set;}  
        string LinkTarget{get;set;}  
        BulletedList LinksBulletedList{get;}  
        Dictionary<stringstring> ListLinks{get;set;}  
        string LinkColor{get;set;}  
     
    }  
     

    To use the RadEditor you need to add a RadEditor contro. You can see a sample usage of the RadEditor in the attached files.

    Hope this information will help you.

    Regards,
    Parvan
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Register for webinar
9 posts, 0 answered