More in this section
Forums / Designing with Sitefinity / Shared content displayed in a table format?

Shared content displayed in a table format?

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
2 posts, 0 answered
  1. Bart Welch
    Bart Welch avatar
    64 posts
    10 Jul 2009
    01 Oct 2009
    Link to this post
    I need to build a page with a table layout and I want each item within the table to be its own content module.  This would allow me to use the same module in other areas of the Web site.  For example:  a 4 column by 10 row table with column and row headings.  Each cell in the table is an individual shared content module.  Can this be done?
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    12 Sep 2017
    02 Oct 2009
    Link to this post
    Hi Bart Welch,

    The easiest way will be using RadGrid bound to the list of ContentItems. If you want to use a table there are two ways.

    1. Create a custom class that inherits from ContentView. In this class Find the basic repeater and set it as not required. Then modify the template for your custom control. Add a new repeater control. Inside the ItemTemplate of the newly added repeater you should have three ( or more ccontrols depending on what you want to display) controls. To get the <td> and <tr> elements dynamically created you should check whether the content items are divisible by the current rows and columns. By doing so when you add a new item from the backend it will be automatically added to your table.

    2. Create a static tables - say 4 by 9. This means 36 cellls. Create a custom control with WebEditor that could select shared content. Generate 36 simple properties for your custom contriol. For each property you should add or remove a content item using the WebEditor. This will allow you to remove or show a certain items, but this should be manually done.

    I hope this helps.

    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
2 posts, 0 answered