简体   繁体   English

如何在Sharepoint 2010中获取网站集搜索结果页面?

[英]How to get the site collection search results page in Sharepoint 2010?

There's a "Site Collection Search Results Page" field which is used for configuring the search results page used for contextual searches (such as "This Site"). 有一个“网站集搜索结果页面”字段,用于配置用于上下文搜索的搜索结果页面(例如“本网站”)。 It can be found by doing the following: 通过执行以下操作可以找到它:

  1. Go to your SharePoint site collection 转到SharePoint网站集
  2. Select "Site Settings" from the "Site Actions" menu 从“网站操作”菜单中选择“网站设置”
  3. Go to the "Site Collection Administration" section and select "Search Settings" 转到“网站集管理”部分,然后选择“搜索设置”
  4. The field "Site Collection Search Results Page" will be listed on the bottom. “网站集搜索结果页面”字段将列在底部。

The default value is 默认值为

/_layouts/osssearchresults.aspx

How can I retrieve and change this value through the SharePoint object model? 如何通过SharePoint对象模型检索和更改此值?

The setting is stored in: 该设置存储在:

site.RootWeb.AllProperties["SRCH_TRAGET_RESULTS_PAGE"] 

If doesn't exist or is null then '/_layouts/osssearchresults.aspx' is used 如果不存在或为null,则使用'/_layouts/osssearchresults.aspx'

The Search Center URL is in 搜索中心网址位于

site.RootWeb.AllProperties["SRCH_ENH_FTR_URL"] 

And the drop down mode in 而下拉模式

site.RootWeb.AllProperties["SRCH_SITE_DROPDOWN_MODE"] 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何获取SharePoint 2010网站的默认/欢迎页面? - How Do I Get The Default/Welcome Page Of A SharePoint 2010 Site? 如何在Sharepoint站点工作流2010中获取当前用户? - How to get Current User in Sharepoint site workflow 2010? SharePoint 2010-如何获取网站模板/网站定义的装订功能列表? - SharePoint 2010 - how to get list of stapled features for a site template / site definition? 如何通过Windows应用程序访问具有基于声明的身份验证的SharePoint 2010网站页面? - How can I access SharePoint 2010 site page which has claim based authentication through windows application? 使用FullTextSQLQuery的Sharepoint自定义搜索结果页 - Sharepoint Custom Search Results Page using FullTextSQLQuery 将常规C#代码添加到SharePoint 2010网站页面 - Add general C# code to a SharePoint 2010 site page 如何编写自定义搜索页面以仅在SharePoint 2007中搜索当前网站和子网站? - How do I code a custom search page to search current site and sub-sites only in SharePoint 2007? Sharepoint2010。搜索 - Sharepoint 2010. Search 如何使用ac#client从SharePoint 2010站点注销? - How to logoff from a SharePoint 2010 site using a c# client? 如何在SharePoint 2010中获取服务应用程序权限 - How to get Service Application Permissions in SharePoint 2010
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM