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

Forums / Developing with Sitefinity / Detect Sitefinity Internal Search

Detect Sitefinity Internal Search

3 posts, 0 answered
  1. Jeff
    Jeff avatar
    11 posts
    Registered:
    23 Aug 2011
    25 Jun 2014
    Link to this post

    In the codebehind for a custom widget I want to detect when the page is being crawled by the internal Sitefinity search.  For example, my widget displays a product price.  I don't want this price to appear in the preview of the search results.  My plan is to add code to the widget so that no price is rendered when the page is indexed (Sitefinity internal search seems to treat my widget as "Static HTML" for the purpose of indexing).

     I was hoping for a method like this.IsCrawler (similar to this.IsDesignMode).  But if there is some other way to detect it (perhaps by looking at the user or browser information?) then that would be fine.

  2. Svetoslav Manchev
    Svetoslav Manchev avatar
    735 posts
    Registered:
    29 Nov 2016
    27 Jun 2014
    Link to this post
    Hi Jeff,

    You can try to implement you own logic to place the price /or the content you need/ in a separate layout elements.

    Than using that blog post to hide this content from the search indexing.

    Regards,
    Svetoslav Manchev
    Telerik
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
  3. Charles
    Charles avatar
    36 posts
    Registered:
    18 Apr 2011
    26 Feb 2015 in reply to Svetoslav Manchev
    Link to this post
    How do you do this in SF 3.7? I want to detect in code, when the page is being rendered for search. I'd like to hide content. I know I can do this in the fieldsInfoProvider but is there an api method?
3 posts, 0 answered