Module Relationships

Posted by Community Admin on 04-Aug-2018 02:01

Module Relationships

All Replies

Posted by Community Admin on 22-May-2012 00:00

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

Posted by Community Admin on 24-May-2012 00:00

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

Posted by Community Admin on 30-May-2012 00:00

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

Posted by Community Admin on 31-May-2012 00:00

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

This thread is closed