简体   繁体   English

优化搜索结果控制

[英]Refine search results control

I am using People Search Core Results PageLayout for my People Search WebPart. 我正在使用People Search WebPart的People Search核心结果PageLayout。 By default when you search it gives an option of Refine your search. 默认情况下,当您搜索时,它会提供优化搜索的选项。 As I observe its getting those options from a Control. 当我观察到它从控件中获得这些选项时。 <SEARCHWC:RefineSearchResults runat="server" Title="<%$Resources:sps,RefineByTitle%>" SearchProperty="JobTitle"/> <SEARCHWC:RefineSearchResults runat =“ server”标题=“ <%$ Resources:sps,RefineByTitle%>” SearchProperty =“ JobTitle” />
I tried to edit the page layout and added my property in the Title value but it throw a error. 我试图编辑页面布局,并在Title值中添加了我的属性,但它引发了错误。 <SEARCHWC:RefineSearchResults runat="server" Title="<%$Resources:sps,RefineBymyProperty%>" SearchProperty="myProperty"/> <SEARCHWC:RefineSearchResults runat =“ server”标题=“ <%$ Resources:sps,RefineBymyProperty%>” SearchProperty =“ myProperty” />
Can any one help me how to add myproperty on the page. 谁能帮我在页面上添加我的财产。

Thanks in advance 提前致谢

I found out that the RefineSeachResults control is sealed in Moss 2007 but in SharePoint 2010 its extendable. 我发现RefineSeachResults控件在Moss 2007中是密封的,但在SharePoint 2010中是可扩展的。 That is the reason you can't find it in the control templates even though it represents to be as user control. 这就是即使您将其表示为用户控件,也无法在控件模板中找到它的原因。 To add you propoerty for example in my case to show "myProperty" I have kept that inline and it worked. 例如,在我的案例中添加“ propererty”以显示“ myProperty”,我一直保持该内联并且它起作用了。
<SEARCHWC:RefineSearchResults runat="server" Title="RefineBy myProperty" SearchProperty="myProperty"/> <SEARCHWC:RefineSearchResults runat =“ server” Title =“ RefineBy myProperty” SearchProperty =“ myProperty” />
If you have scenario where you want extra functionality other that OOB then the only option is write custom control. 如果您有需要除OOB以外的其他功能的情况,那么唯一的选择就是编写自定义控件。 Hope this might help someone. 希望这可以帮助某人。 Thanks 谢谢

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM