Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Michal Koblasa 45 posts 139 karma points
    Mar 11, 2016 @ 13:56
    Michal Koblasa
    0

    ContentFinder - IContentFinder order of evaluation

    Hello, i have ContentFinderResolver with more resolvers and i need to ensure, that some order of elavuation is kept.

    At start i wrote this:

            ContentFinderResolver.Current.InsertTypeBefore<ContentFinderByNotFoundHandlers, CatalogDetailContentFinder>();
            ContentFinderResolver.Current.InsertTypeBefore<ContentFinderByNotFoundHandlers, SearchContentFinder>();
    

    But i need to evaluate SearchContentFinder before CatalogDetailContentFinder. So i made this:

            ContentFinderResolver.Current.InsertTypeBefore<ContentFinderByNotFoundHandlers, CatalogDetailContentFinder>();
            ContentFinderResolver.Current.InsertTypeBefore<CatalogDetailContentFinder, SearchContentFinder>();
    

    Should it work? I did not find much documentation around this. Thank you for advices

  • Jeroen Breuer 4909 posts 12266 karma points MVP 5x admin c-trib
    Mar 11, 2016 @ 14:48
    Jeroen Breuer
    102

    Hello,

    You could simply find out by debugging, but I think the above code looks good. This way SearchContentFinder should go before CatalogDetailContentFinder.

    Jeroen

  • Michal Koblasa 45 posts 139 karma points
    Mar 11, 2016 @ 17:18
    Michal Koblasa
    0

    Yep, you right. Debugging went well and other error confused me. So this piece is working. Thank you.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies