Adding Taxonomy to intra-site modules?

Posted by Community Admin on 04-Aug-2018 17:48

Adding Taxonomy to intra-site modules?

All Replies

Posted by Community Admin on 27-Jun-2012 00:00

Following the Testimonials Intra-site Module -- how do you add the taxonomy to an intra-site module?  Ideally I want it to mimic the same way that a module builder would have.  I don't want to "recreate the wheel" by creating that taxonomy selector widget.  

also how do you create the necessary tables/mapping that when the "testimonial" module is initially installed or update an existing module?

Posted by Community Admin on 03-Jul-2012 00:00

Hi Simon,

Taxonomies are associated with module items through custom fields. This is both true for built-in modules and custom modules. An example Color taxonomy is implemented in the Products Module in the SDK.

You don't need to implement a selector from scratch. Instead, you can use either HierarchicalTaxonField or FlatTaxonField.

As for upgrades and mappings, I've replied in your other forum thread.

All the best,
Slavo
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 09-Jul-2012 00:00

Simon,

if you are creating an intra-site module with your own data model, you're likely not inheriting from Content which is required if you wish to extend your model with custom fields like Taxonomy.

This unfortunately is a limitation of working with your own model instead of inheriting from Content (or better yet, using the Module Builder)

However, it is possible to create your own link table that associates your custom item ID with the taxonomyIDs from Sitefinity. This isn't a full integration (more of a hack really) but it does allow you to use the existing taxonomy items and associate them manually with your custom data.

This is still limiting, however, since the TaxonomyField is not designed to work outside of a Content-based module designer.

I've worked around this by building my own Tags selector using an asp.net CheckboxList. if you are interested I can perhaps write up a blog post that demonstrates how I did this.

You may find however that the Module Builder (which has improved immensely since the introduction of intra-site modules) might be a better fit for your needs

hope this is helpful!

This thread is closed