More in this section

Forums / Developing with Sitefinity / Generic Content Based Module

Generic Content Based Module

3 posts, 0 answered
  1. scorpionjade
    scorpionjade avatar
    10 posts
    03 May 2007
    23 Nov 2009
    Link to this post

    I'm examining the Generic Content based Product Module with the new backend architecture.

    I would like to add two additional metafields on it:
    - One of them will be the markets on which that product will be sold. The data for this metafield should be entered with checkboxes because the product can be sold on multiple markets. (market1, market2, market3)

    -The other metafield will be the color of the products. (red, blue, green) The color data should be entered with a dropdownlist like categories (it should be different from categories, because I've already used categories for its own purpose)

    For each metafield, I would like to handle their lists like I am able to do with categories. (Like "manage colors" and "manage markets" on the commandpanel)

    I need help on creating these two metafields with the defined features.

    I'm adding all metafields with searchable property, but I'm not sure about the performance when the data is searched via complex queries. (like select all products in market1 and market whose colors are red or green) Any ideas?

    And lastly I would like to get rid of content description area.

    That was a kinda long description but I hope this will resolve my questions on mind about generic content based modules.

    Thank you very much!

  2. scorpionjade
    scorpionjade avatar
    10 posts
    03 May 2007
    24 Nov 2009
    Link to this post
    Any assistance on this please?
  3. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    01 Feb 2016
    24 Nov 2009
    Link to this post
    Hi scorpionjade,

    Thank you for using our services.

    For the first two requirements, please take a look at the following blog posts:
    Products module: Adding and removing meta fields
    Products module: Reusing Views
    Products module: Adding new features to Generic Content module
    Products module: Insert / Edit templates control guidance

    What you should do after you add those additional metafields is to develop new views for managing the collections of those new meta fields. You should create tables and data classes that will store a collection of market places and colors available in your database. Then in those views you should use some logic for dealing with the CRUD operation to maintain those collections.

    Then in the Insert/Edit templates for new product items you will add some logic for binding these collections of market places and colors to some web controls for visual display (dropdown lists, check boxes, etc). And then subscribe to the click event of Create/Save button to save selected values to the metafields using the ContentManager.SetMetaData() method.

    As for removing the Description. You should  first remove the Description metafield from the web.config and then remove the controls with ID="Description" from the Insert/Edit control templates.

    All the best,
    Radoslav Georgiev
    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.
Register for webinar
3 posts, 0 answered