More in this section

Forums / Developing with Sitefinity / 'overriding categories' site wide

'overriding categories' site wide

4 posts, 1 answered
  1. Jochem Bökkers
    Jochem Bökkers avatar
    787 posts
    Registered:
    13 Aug 2007
    18 Aug 2009
    Link to this post
    Hi,

    By deault SF stores categories in the sf_CmsCategory table with an 'Application' column storing from wich content type the category is.  Is there an easy way to rule out the application from categories and by that making categories 'site wide' or do we need to overrule categories in content type ?


    For instance we want a category 'Team A' but content needs to be linked from news, events and libraries. That way it would be easy to filer out any information on the site.

    Thanks,
    Jochem.
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    18 Aug 2009
    Link to this post
    Hello Jochem,

    Unfortunately it is not possible to achieve desired functionality with one category. Each content item is associated with the provider name. The public control (CategoriesTree) requires setting of a provider which is a string. Then we gets the instance of the ContentManager class initialized with the given provider name (ContentManager(ProviderName). Finally the control lists only categories and categorized items from this provider.

    Regards,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
    Answered
  3. Jochem Bökkers
    Jochem Bökkers avatar
    787 posts
    Registered:
    13 Aug 2007
    18 Aug 2009
    Link to this post
    Hey Ivan,

    Thanks for the reply (you're up late no?) I figured you couldn't rule out the provider part.

    So the best way to mimic this functionality is to build a custom module that creates "teams" so to speak and when saving it, also automatically add the "team" category in the sf_CmsCategory table for each provider?

    if client creates "team A"... we'd add "Team A" for News, Blogs, Events, Images and GC providers... and just mimic this functionality so to client it would appear the same category ?

    Or is it better to ignore Categories and create a metafield to link the different providers ?

    Thanks,
    Jochem.
  4. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    21 Aug 2009
    Link to this post
    Hello Jochem,

    Synchronization between categories sounds good, but how would you display the content on the public page? I am not sure how well will this scale, if you should iterate through all providers, looking for content items with this category. You can implement some kind of cache for this. 

    The new metafield approach sounds better to me.

    Best wishes,
    Georgi
    the Telerik team

    Instantly find answers to your questions on the newTelerik Support Portal.
    Check out the tipsfor optimizing your support resource searches.
Register for webinar
4 posts, 1 answered