修改WSS的osssearchresults.aspx页面 [英] Modify osssearchresults.aspx page of WSS

查看:32
本文介绍了修改WSS的osssearchresults.aspx页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个应用程序,我们在其中修改 MOSS 搜索结果页面 (Results.aspx) 的搜索核心结果 Web 部件 XSLT 以调用一些自定义 javascripts.是否可以对 WSS 的应用程序级别页面(即 osssearchresults.aspx )执行相同操作?

We have an application where we modify the search core resuult web part XSLT of MOSS search result page (Results.aspx) to call some custom javascripts . Is it possible to do the same for the application level page of WSS i.e osssearchresults.aspx ?

推荐答案

您无法更改 WSS 安装中的搜索结果页面,您需要稍微自定义您的母版页以更改该行为.

You cannot change the search results page in a WSS installation, you need to customize your masterpage a bit to change that behavior.

默认为:

<SharePoint:DelegateControl runat="server" ControlId="SmallSearchInputBox" />

但是您可以在控件下渲染一些 javascript 来为您修复链接(jQuery 示例):

but you can render some javascript under the control to fix the link for you (jQuery sample):

<script type="text/javascript">
    $(".ms-searchform a[@id $= '_go']").attr("href", "#").click(function() { 
    // redirect to new page, getting the selected scope and keyword 
    });
</script>

选择器获取.ms-searchform 类下以_go 结尾的a 元素在其 id 属性中".获取范围和关键字,其方法类似.

the selector gets "the a element under the .ms-searchform class that ends with _go in its id attribute". to get the scope and keyword, its a similar approach.

这篇关于修改WSS的osssearchresults.aspx页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆