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

推荐订阅源

S
SegmentFault 最新的问题
人人都是产品经理
人人都是产品经理
Blog — PlanetScale
Blog — PlanetScale
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Cisco Talos Blog
Cisco Talos Blog
Spread Privacy
Spread Privacy
Scott Helme
Scott Helme
C
CXSECURITY Database RSS Feed - CXSecurity.com
S
Securelist
酷 壳 – CoolShell
酷 壳 – CoolShell
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
I
Intezer
博客园 - 叶小钗
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
雷峰网
雷峰网
量子位
Security Latest
Security Latest
P
Proofpoint News Feed
P
Privacy International News Feed
P
Palo Alto Networks Blog
D
DataBreaches.Net
大猫的无限游戏
大猫的无限游戏
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Google Online Security Blog
Google Online Security Blog
Webroot Blog
Webroot Blog
云风的 BLOG
云风的 BLOG
N
Netflix TechBlog - Medium
Vercel News
Vercel News
博客园 - 【当耐特】
C
CERT Recently Published Vulnerability Notes
Hugging Face - Blog
Hugging Face - Blog
月光博客
月光博客
Hacker News - Newest:
Hacker News - Newest: "LLM"
K
Kaspersky official blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Stack Overflow Blog
Stack Overflow Blog
AWS News Blog
AWS News Blog
博客园 - Franky
爱范儿
爱范儿
T
Tor Project blog
The GitHub Blog
The GitHub Blog
宝玉的分享
宝玉的分享
小众软件
小众软件
L
LINUX DO - 最新话题
Application and Cybersecurity Blog
Application and Cybersecurity Blog
W
WeLiveSecurity
SecWiki News
SecWiki News
L
LangChain Blog
I
InfoQ

博客园 - aito

在Umbraco使用Edit in Cavas(实时编辑器)注意两点 在Umbraco中建立连接列表 在空的Umbraco中建立网页 win 7上安装Umbraco Entity Framework基础:新建一个EF应用 利用VS2010安装的SQL Express2008直接建立数据库文件 新建MCV建立测试工程,编译出错的解决办法 VS中各种文件及其扩展名 MVC学习笔记一:基础知识 分页查询SQL语句 ADO.NET事务处理 将存储过程用于Command对象 参数化SQL语句 ADO.NET常用对象 ADO.NET简介 jQuery选择器 插入运行代码 - aito - 博客园 Button控件 - aito - 博客园 CSS选择器
在Umbraco中使用XSLTsearch包实现搜索功能
aito · 2011-03-04 · via 博客园 - aito

目标:在网站中使用XSLTsearch包实现搜索功能

实现的结果:

首先要下载好XSLTsearch包(不下载在线安装也可以,我是下载在本地安装的),在Developer->Packages->Install local package中按提示安装好XSLTsearch包,安装好后的结果如下图:

Installed packages显示已安装的Packages

安装好后,自动生成几个文件:XSLT File、Macros(宏)、文档类型、模版、内容的根目录上生成一页名为Search的页。

调用Search文件实现搜索功能,在虽要实现搜索的页面加上例如如下代码:

在action中调用/Search.aspx即可。

默认情况下是采用get方式,这里可以改为post方式,如:

<form  method="post" action="/Search.aspx" class="site_search">
        <fieldset class="site_search">
          <label for="search">Search</label>
          <input type="text" name="search" id="search" />
          <input type="submit" value="search" />
        </fieldset>  
</form>

注意:这里有一个地方要按实际情况来修改的

就是看生成的实际XSLTsearch模版页,里的内容如下图:

要根据MasterPageFile的模版页里的实际的ContenPlaceHolderId来修改。

技巧:不用看模版也可以很方便插入这个ID,在XSLTsearch模版的工具栏中点击如下图标即可很方便地选择ID

选择ID

按如上方法则可实现在需要的页面上加上搜索功能,但是如果想在搜索结果页再进行搜索点击“搜索”按钮后你会发现没反应,原因是在XSLTSearch模版页引用XSLTSearch宏的时候没有加入<form>标签。修改XSLTSearch模版页即可,如下图: