Forums / General Discussions / News filter - Filter on Content

News filter - Filter on Content

1 posts, 0 answered
  1. Joe
    Joe avatar
    Registered:
    24 Feb 2009
    07 Mar 2012
    Link to this post
    In sitefinity, you can create MetaData filters to refine your searches on content lists. In my case it's new's content.  I would like to be able to filter on the content itself, based on a passed in text string. Unfortunately, there is no obvious way to do this using the Telerik objects, and we are left bringing back (potentially all of) the news items and using linq to filter the content based on the passed in text string (keyword). Is there any other way of doing this?

    Thanks...

    NewsManager

     

    newsManager = new NewsManager(ProviderName);


    content = newsManager.Content.GetContent(0, 0, SortExpression, tag,
    null, null, null, filters).Cast<IContent>();

    if(!string.IsNullOrEmpty(filterText))

    {

    content = content.Where(x => x.Content.ToString().ToUpper().Contains(filterText)).ToList();

    }

1 posts, 0 answered