Detect Sitefinity Internal Search
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.
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
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?