More in this section

Forums / Developing with Sitefinity / Wrapping multiple Generic Content

Wrapping multiple Generic Content

5 posts, 0 answered
  1. Johan Rosengren
    Johan Rosengren avatar
    1 posts
    Registered:
    26 Jan 2010
    10 Apr 2010
    Link to this post
    Hi,
    We're looking for a method to make user controls with multiple editor areas. (So our editors can drag eg. 2 column layout into the content placeholder.
    For the moment we have solved this by using snippets that includes <div>, but it's quite sensitive while editing.

    Is there any way to wrap multiple generic contents in a single user control?

    Please help us!

    / Johan
  2. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    10 Apr 2010
    Link to this post
    I'm pretty sure SF 4 will come with layout items which then accept controls...

    However if you can figure this doozy out in 3.7 I'd be very interested in the solution :)
  3. LBrinley
    LBrinley avatar
    59 posts
    Registered:
    29 Dec 2005
    11 Apr 2010
    Link to this post
    We solve this problem using templates within the RadEditor.  A separate template for 3-column, 2-column, 1-column, etc. can be created and loaded into a single Generic Content editor to allow multiple layouts in any Generic Content control.  Admittedly, you should use tables, instead of divs, for the multi-columnar layouts to avoid the 'sensitivity' when editing that you have noted.  However, this solution is much more easily implemented than wrapping multiple GC controls in a single composite control and works perfectly.
  4. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    11 Apr 2010
    Link to this post
    Can you expand on that?

    What do you mean by templates in the RadEditor?  Like custom editor that literally has 3 GC Editors in it that renders to a table on submit?

    Or you put a 1-3 column table template into the RadEditor?
  5. LBrinley
    LBrinley avatar
    59 posts
    Registered:
    29 Dec 2005
    12 Apr 2010
    Link to this post
    The RadEditor, itself, supports HTML templates via its Template Manager.  Rather than create a custom composite control to house two or more Generic Content areas, we simply create, for example, an HTML template that has 2 columns and another that contains 3 columns (using tables for the reasons previously cited).  A content creator can then load the 2-column or 3-column template into any Generic Content control's RadEditor to achieve the desired number of columns in the page.  The solution is simple, is extensible (additional HTML templates can be added at any time), leverages the existing GC control/RadEditor architecture without modification, and it works.
Register for webinar
5 posts, 0 answered