More in this section

Forums / Developing with Sitefinity / User Control to wrap around Generic Content

User Control to wrap around Generic Content

2 posts, 0 answered
  1. Martin
    Martin avatar
    10 posts
    Registered:
    09 Jan 2008
    26 Mar 2008
    Link to this post
    Hi there,

    Maybe I'm missing the blindly obvious, but I'm having trouble with what seems like it should be a very simple task.  Here's what I need to do: create a user control that acts like a wrapper for the Generic Content control, so that when I add it to a page in Sitefinity, I can still Edit it and add my own content using the RadEditor (like a normal Generic Content control), but it would have extra fields under the Properties tab that I would use to control the layout that my wrapper adds around the control (specifically, I'd like to add a field under "Properties" that takes text input and displays that text (with static formatting) above the content added with the Generic Content control.

    Does that make sense? if so, does that sound doable?  I've looked through a number of different solutions and haven't been able to find one that will allow me to do exactly what I want to do.

    Dan
  2. Martin
    Martin avatar
    10 posts
    Registered:
    09 Jan 2008
    26 Mar 2008
    Link to this post
    Hi - I figured this out... I was going from the following sample code:

    http://www.sitefinity.com/help/DevelopersManual/Add_a_Generic_Content_Module_to_a_User_Control.html

    And I realized I had forgotten to make the class inherit from the IContentContainer class... added that, and suddenly the editor for the Generic Content control popped up in design time, just like I wanted it to :D
2 posts, 0 answered