More in this section

Forums / Developing with Sitefinity / Custom Content module that can join with other table

Custom Content module that can join with other table

2 posts, 0 answered
  1. KWong
    KWong avatar
    8 posts
    24 Nov 2008
    14 Aug 2009
    Link to this post
    I am developing a custom module that can let the end user select multiple values (checkboxes) such as regions. It doesn't looks like the metadata supporting collections. I created a new database table to store the 1 (content) to many (regions) much like the tags or comments. It works out pretty well to creating and updating. My problem is that when I try to query against the content using the default provider, that's no way I can join the content and the regions table using the existing content manager such as content with region 1 and 2. It looks like I need to provide my own provider that has the underlying join implemented. Is that a better way or a practical solutions to achieve my goal without rewrite the entire data provider? Ideas and directions are appreciated.

    Ken Wong.
  2. Georgi
    Georgi avatar
    3583 posts
    28 Oct 2016
    18 Aug 2009
    Link to this post
    Hello KWong,

    I am thinking for a metafield, in which you can save the checkboxes values in the following format:

    • checkbox1=value;checkbox2=value;checkbox3=value.........

    Then you can create a type converter to create a collection out of this string. The metafield will be of LongText type. This way you will not rewrite or extend the data provider.

    What do you think?

    Best wishes,
    the Telerik team

    Instantly find answers to your questions on the newTelerik Support Portal.
    Check out the tipsfor optimizing your support resource searches.
2 posts, 0 answered