[英]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: 通过执行以下操作可以找到它:
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.