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

Forums / Developing with Sitefinity / Search Manipulation

Search Manipulation

3 posts, 0 answered
  1. KMac
    KMac avatar
    133 posts
    Registered:
    15 Dec 2008
    25 Feb 2009
    Link to this post
    Hello,

    I'm trying to achieve two things with the sitefinity search controls:

    First, I've got two radio buttons (call them Entire Site and News) that I want to use to switch between different index catalogues. In the past I've used some javascript to capture what radio button is selected and redirect to the search results page with a modification to the querystrings IndexCatalogue item. It works, but I'm always wondering if there is a more elegant way. Is there?

    Second, and this I don't know how to do, for the News results of this particular site I only want to index one particular category of News items. Is there a way to control the index to filter out all the other categories (including uncategorized news)? I tried using just a news index that points to a specific page which the news items in question, but it doesn't seem to index any of the full details of a news item, only the newsMaster page.

    Any ideas?
  2. KMac
    KMac avatar
    133 posts
    Registered:
    15 Dec 2008
    25 Feb 2009
    Link to this post
    Scratch the second question. I just deleted the index and recreated it and all seems good.
  3. Parvan
    Parvan avatar
    151 posts
    Registered:
    24 Sep 2012
    02 Mar 2009
    Link to this post
    Hello Kalvin MacLeod,

    Thank you for contacting us.

    About your first question: your solution is good. The SearchBox control uses query string to pass all needed information (query text, index catalog, word mode search).

    About your second question: it is possible to filter news items by category. You need to extend the NewsModule class and override its GetSeviceClients() method. Also check the method GetContentToIndex() in which the actual filtering is implemented.
    1. Put the attached files in your App_Code folder.
    2. Change this line in your web.config file:
    before: 
    <add type="Telerik.News.NewsModule, Telerik.News"/>--> 
     
    after: 
    <add type="Telerik.News.ExtendedNewsModule, App_Code"/> 

    I hope this information is helpful.

    All the best,
    Parvan
    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.
Register for webinar
3 posts, 0 answered