1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Module Relationships

Module Relationships

4 posts, 0 answered
  1. Atul
    Atul avatar
    3 posts
    Registered:
    15 Mar 2012
    22 May 2012
    Link to this post
    Hi Guys,

    I need to create a Products module for my project and I can easilly achieve that using Module Builder but every product belongs to a product type & client would like to see a drop down for the product type while adding the new product.

    I was expecting that while adding product there might be an option of adding categories using Taxonomy just like News but it's not there. 

    Please help.
    Atul
  2. Stoimen Stoimenov
    Stoimen Stoimenov avatar
    60 posts
    Registered:
    24 Aug 2017
    24 May 2012
    Link to this post
    Hi Atul,

    Thank you for contacting us.

    In case the product type is a custom classification it can be easily added as a field to your content type and then when creating an item there will be a list with all of the custom classification items, similar to the way tags and categories are added. Here are detailed steps:
    1. Go to Content -> All classifications and create a new one called "Product Types"
    2. Edit the fields for your module
    3. Add a new field with type classification
    4. For the "Classification" dropdown select your custom classification - in your case product types
    5. Save the field and your module
    6. Now when creating new items there will be a list with all of the product types

    However if your "Product type" is another module you can relate the two modules as shown in this blog post. This feature is planned for future releases but for now this is the only workaround.

    Regards,
    Stoimen Stoimenov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Atul
    Atul avatar
    3 posts
    Registered:
    15 Mar 2012
    30 May 2012
    Link to this post
    Thanks Stoimen, that works great. Now when I embed the default widget in my page I see it rendering all the records. I would like to filter the records based on my classifications but don't see any option in the Edit screen except Selection by: Categories, Tags & Date.

    Whereas I was assuming the classifications will appear in that window and I would be able to filter the records.

    Please advise.

    Thanks,
    Atul
  4. Stoimen Stoimenov
    Stoimen Stoimenov avatar
    60 posts
    Registered:
    24 Aug 2017
    31 May 2012
    Link to this post
    Hi Atul,

    Unfortunately filtering by custom classification is not supported out of the box. I looked for a simple workaround but I couldn't find. The only thing I can think of is to implement your own control to filter items by custom classification using the Code Reference and Sitefinity documentation. To ease the process of widget development and registering the widget to pages toolboxes you can use Sitefinity Thunder VS plugin

    Another alternative is to use the Categories widget to filter the items. To do so you must do the following:
    1. Extend the Categories widget as shown in this guide and place the new widget on a page
    2. The IDs for the taxonomies should be displayed. If they are not shown, edit the widget delete the values for TaxonomyId and FieldName and save.
    3. Select the ID for your custom classification, edit the widget and set it to the TaxonomyId property
    4. In the FieldName property enter the "Single name" for your classification and save.
    5. Place the Widget generated for your custom module on the same page and save the page
    6. View the page in the front end -> When you click on the classifications (in your case the products) the items in the custom module widget will be filtered.
    I don't know if this will fit perfectly in your case but I hope that it might help.

    Feel free contacting us if you have more questions.

    Kind regards,
    Stoimen Stoimenov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
4 posts, 0 answered