如何将网站页面作为 URL 提供给 sharepoint searchbox 控件的 SearchResultPageURL 属性?

发布于 2024-10-10 05:58:19 字数 835 浏览 0 评论 0原文

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <Control
     Id="SmallSearchInputBox"
     Sequence="24"
     ControlClass="Microsoft.SharePoint.Portal.WebControls.SearchBoxEx"
     ControlAssembly="Microsoft.SharePoint.Portal, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">
    <Property Name="SearchResultPageURL">**~Site/Pages/Customsearchresults.aspx**"></Property>
    <Property Name="FrameType">None</Property>
    <Property Name="DropDownMode">HideDD_NoScope</Property>
    <Property Name="TextBoxWidth">140</Property>
    <Property Name="ShowAdvancedSearch">false</Property>

  </Control>
</Elements>

~ 运算符不起作用。我不想提供应用程序页面网址。

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <Control
     Id="SmallSearchInputBox"
     Sequence="24"
     ControlClass="Microsoft.SharePoint.Portal.WebControls.SearchBoxEx"
     ControlAssembly="Microsoft.SharePoint.Portal, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">
    <Property Name="SearchResultPageURL">**~Site/Pages/Customsearchresults.aspx**"></Property>
    <Property Name="FrameType">None</Property>
    <Property Name="DropDownMode">HideDD_NoScope</Property>
    <Property Name="TextBoxWidth">140</Property>
    <Property Name="ShowAdvancedSearch">false</Property>

  </Control>
</Elements>

The ~ operator doesnt work. I dont want to give an application page url.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

黑寡妇 2024-10-17 05:58:19

true

如果您希望自定义网站页面成为目标搜索结果页面,则必须使用 UseSiteDefaults 属性。

true

UseSiteDefaults property is a must if you want a custom site page to be the target searchresults page.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文