Copied to clipboard

Flag this post as spam?

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


  • Rosen Petrov 8 posts 28 karma points
    Nov 11, 2021 @ 09:16
    Rosen Petrov
    0

    How to query IContent with IQuery by Culture Specific Name

    Hello,

    I have a case where I want to use the IContentService.GetPagedChildren with an IQuery. I have a multilanguage website and I want to query for Content which name starts with particular string. So, here is my query

    var filter = _sqlContext.Query<IContent>().Where(x => x.Name.Contains("DOESNT_MATTER"));
    

    But this doesn't consider the culture specific name and always checks for the default Language name. And if I try with this, it throws "Not supported" error.

     var filter = _sqlContext.Query<IContent>().Where(x => x.GetCultureName(culture).Contains("DOESNT_MATTER"));
    

    Any ideas on how to accoplish what I want?

  • 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