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

Forums / Developing with Sitefinity / Hooking into existing Categories or Tags

Hooking into existing Categories or Tags

4 posts, 0 answered
  1. fregas baratis
    fregas baratis avatar
    185 posts
    Registered:
    14 Nov 2002
    22 Dec 2008
    Link to this post
    Hi all,

    We have a client that wants a custom contact directory.  Each contact will be associated with one or more industries and one or more regions.  Basically these regions and industries are just categories--there's no other logic or data that needs to go with them.

    In addition to this, the client would like to post documents and news articles in the same industries and categories.  So my question is, can sitefinity let me use one set of categories with all the regions and industries in them, so that my contacts module, and the built in news and document modules all use the same categories?  They want this to all be cross-referencable on the site.  This way, when someone looks at a contact, they can see related documents in the same industry as that person, or when looking at a document, they can see related contacts in the industry. 

    Thanks,
    Craig
  2. fregas baratis
    fregas baratis avatar
    185 posts
    Registered:
    14 Nov 2002
    23 Dec 2008
    Link to this post
    (nudge)

    I thought of another way to do this, so someone let me know if this is possible.

    Could I put my own industries and regions in my own table, then modify the news and documents admin to have a couple of extra fields, which would a drop down showing either the industries or regions?  I know you can add custom fields to modules, but I wasn't sure if they could be lookups in another table?

    Anyone done this?  Is it hard?
  3. Mike
    Mike avatar
    208 posts
    Registered:
    10 Dec 2007
    27 Dec 2008
    Link to this post
    If I understand your issue, you want a common category list that can be used by any module, since the OOTB category is scoped only to that particular module.

    You can use any sort of control you like, bound to an external data source (or perhaps a Sitefinity list) and then persist it as a custom metafield with your content item.   It's not particularly hard, either (heck, I can do it! ;^)

    The important part is that your custom control needs to implement the ITextControl interface.  Since Sitefinity doesn't know what property of your control exposes the selected category, you tell it by providing a Text property.  See this post for an example:

    http://www.sitefinity.com/support/forums/support-forum-thread/b1043S-bmbtgh.aspx

    Now, that example uses a static radio button list but you could use a dropdown or grid control that is databound to an external data source.  Just make sure you have code that update the Text property when a value is selected, and it will be persisted with the content item.

    Regards,
    Mike Sharp

  4. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    29 Dec 2008
    Link to this post
    Hi,

    Mike, thank you for your valuable response! We have updated your Telerik account for that.

    Kind regards,
    Georgi
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Register for webinar
4 posts, 0 answered