Sitefinity Searching widget searching from tamplets also

558 Views Asked by At

I am facing one problem with sitefinity search option. That is if i enter any keyword in search option its show all those pages which contain that keyword, but here its showing from tamplets also, i want it to search from context only, not from templates.

Thanks in advance

3

There are 3 best solutions below

0
On

This is a duplicate of a question posted here: Sitefinity How to Exlude Template from Searching

As I mentioned there you can try adding a robots.txt metatag like this into the top of the template:

<meta name="robots" content="noindex" />

In more recent versions of Sitefinity you can also uncheck a box at each page level that will prevent the page from being indexed. The column for this setting in the database is sf_page_data (table) .. crawlable (column) in case you want to write a sql script to update several pages at once.

The exclusion of templates from search is mentioned in more detail here: http://www.sitefinity.com/devnet/forums/sitefinity-4-x/general-discussions/exclude-page-from-search-index.aspx

Note that this will probably also prevent other search engines (such as google) from indexing that page.

0
On

This may help, I read it in this thread

If your header and footer embed (hard coded) to master page, you can use this code block;

<%if (Page.GetIndexRenderMode()  ==  IndexRenderModes.Normal ) { %>
      <header>contents......</header>
<%}%>
0
On

Ivan Pelovski recently published a blog post on how you can hide content from the search engine by using custom layout controls. Not specifically what you are asking, but maybe it can help.

Here: http://www.sitefinity.com/blogs/ivanpelovski/posts/12-02-06/hiding_page_content_from_the_search_engine_in_sitefinity_using_layout_widgets.aspx