惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

WordPress大学
WordPress大学
GbyAI
GbyAI
P
Proofpoint News Feed
B
Blog
MyScale Blog
MyScale Blog
V
V2EX
B
Blog RSS Feed
Microsoft Security Blog
Microsoft Security Blog
量子位
Jina AI
Jina AI
博客园 - 叶小钗
Recent Announcements
Recent Announcements
有赞技术团队
有赞技术团队
罗磊的独立博客
L
LangChain Blog
I
InfoQ
云风的 BLOG
云风的 BLOG
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
人人都是产品经理
人人都是产品经理
小众软件
小众软件
V
Visual Studio Blog
月光博客
月光博客
The Cloudflare Blog
雷峰网
雷峰网

博客园 - 左右间

幻方阵 整数划分问题之寻找 一组不大于M的互异的整数集,使之和等于N。找出可能的整数集的个数。 关于在cmd命令里的路径包含空格的问题 MSE-项目管理知识体系(一) 导论 导入导出EXCEL数据时有关时间的处理 比较简单的导入导出EXCEL数据的方法 使用aspnet_regiis.exe加密web.config文件 如何使用CAML 批量更新SharePoint List Stsadm 详细文档 关于SPList的Update及AllowUnsafeUpdates 关于silverlight文件的结构 关于VS.NET权限不够的问题 关于Web Part中的Tokens. 关于AD搜索的The server is not operational错误 IIS 中 Service Unavailable问题的解决方法 Flex样式控制小记 如何在WebPart的菜单中添加自定义的Verbs. 关于FireFox网址收藏夹的比较酷的应用 关于使用JavaScript触发ASP.NET Validator验证的问题
SharePoint中传递Search参数的Url的一些研究
左右间 · 2008-04-07 · via 博客园 - 左右间

首先创建两个站点,主站点名字叫 Search, 在它下面有一个子站点, 名字叫Search_111。
 
在主站点的 default page中,SearchBox有三个选项:

  • All sites:http://localhost:6325/_layouts/OSSSearchResults.aspx?k=c&s=All Sites
  • This site: Search:http://localhost:6325/_layouts/OSSSearchResults.aspx?k=c&cs=This Site&u=http://localhost:6325
  • People:http://localhost:6325/_layouts/OSSSearchResults.aspx?k=c&s=People

在主站点的List中:

在Shared Documents list中, 他有4个选项.

  • All sites:http://localhost:6325/_layouts/OSSSearchResults.aspx?k=c&s=All Sites
  • People:http://localhost:6325/_layouts/OSSSearchResults.aspx?k=c&s=People
  • This site: Search:http://localhost:6325/_layouts/OSSSearchResults.aspx?k=c&cs=This Site&u=http://localhost:6325
  • This List:Shared Documents:http://localhost:6325/_layouts/ OSSSearchResults.aspx?k=c&cs=This List&u=http://localhost:6325/Shared Documents
 

在子站点的 default page中.

  • All sites:http://localhost:6325/_layouts/OSSSearchResults.aspx?k=c&s=All Sites
  • This site: Search_111:http://localhost:6325/MMM/_layouts/ OSSSearchResults.aspx?k=c&cs=This Site&u=http://localhost:6325/MMM
  • People:http://localhost:6325/_layouts/OSSSearchResults.aspx?k=c&s=People

在子站点的Task List 中的选项如下:

  • All sites:http://localhost:6325/_layouts/OSSSearchResults.aspx?k=c&s=All Sites
  • This site: Search_111:http://localhost:6325/MMM/_layouts/ OSSSearchResults.aspx?k=c&cs=This Site&u=http://localhost:6325/MMM
  • People:http://localhost:6325/_layouts/OSSSearchResults.aspx?k=c&s=People
  • This List:Task:http://localhost:6325/MMM/_layouts/OSSSearchResults.aspx?k=c&cs=This List&u=http://localhost:6325/MMM/Lists/Tasks

 所以,我猜测他在使用Url传递参数的时候,有两个规则:

Rule1:所有的 search box 包含三项, People, All sites 和 This Site: site name. 如果是 People 或 All sites, 参数为 k=keyword 和s= the scope(All sites or People).如果是This Site: site name,参数为 k=keyword, cs=This Site, u=current site's url.
 
Rule2: 如果当前是在一个List里面,他将包含另外一项, This List: List name. 参数为 k=keyword, cs=This List, u=current list's url.

但是在List里面没有Url这一项,

一些 list's 属性.
Documents->Shared Documents
ParentWeb.Url:   http://localhost:6325
ParentWebUrl:   /
DefaultViewUrl:   /Shared Documents/Forms/AllItems.aspx
Description:   Share a document with the team by adding it to this document library.
Direction:   none
SendToLocationUrl:   
SendToLocationUrl:   
Title:   Shared Documents
 
Lists->Tasks
ParentWeb.Url:   http://localhost:6325
ParentWeb.Url:   /
DefaultViewUrl:   /Lists/Tasks/AllItems.aspx
Description:   Use the Tasks list to keep track of work your team needs to complete.
Direction:   none
SendToLocationUrl:   
SendToLocationUrl:   
Title:   Tasks
 
Lists->Calendar
ParentWeb.Url:   http://localhost:6325
ParentWeb.Url:   /
DefaultViewUrl:   /Lists/Calendar/calendar.aspx
Description:   Use the Calendar list to keep in, deadlines, and other important events.
Direction:   none
SendToLocationUrl:   
SendToLocationUrl:   
Title:   Calendar
 
Sub Lists->Document
ParentWeb.Url:   http://localhost:6325/MMM
ParentWebUrl:   /MMM
DefaultViewUrl:   /MMM/Shared Documents/Forms/AllItems.aspx
Description:   Share a document with the  document library.
Direction:   none
SendToLocationUrl:   
SendToLocationUrl:   
Title:   Shared Documents

我发现他有两个属性, DefaultViewUrl 和 Title, 所以我们可以通过这两个属性把它拼出来.