内容搜索Web部件的紧凑显示模板(CSWP) [英] Compact Display Template for Content Search Web Part (CSWP)

查看:94
本文介绍了内容搜索Web部件的紧凑显示模板(CSWP)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


HTML新手,我确信这是主要问题。我正在寻找一种方法来使搜索结果Web部件更紧凑地显示。我不需要任何额外的列或任何东西,只是想要摆脱尽可能多的空白区域,因为即使两个
行选项占用一个完整的滚动显示10个文档。我选择搜索结果网页部分与静态超链接集合,因为我确实希望它动态更新。


我的第一个想法是编辑两行项目显示模板到尝试与大多数其他帖子做的相反,即删除对第二行的所有引用(相对于复制/粘贴,以向视图添加更多托管属性。)我将以
向上但是,当我切换到新创建的模板时出现错误:Item_Skinny.html:解析时发生了意外的文件结束。第66行,位置1 ..


其中,没有第66行。也许我刚从两行html拷贝中删除了太多或太少。另外,我没有"验证"。但是我不能发布代码?


另一种选择(我喜欢很多)是将它分成两列,每列5个文档。在这个博客上有漂亮的教程/结果,但它表示它不适用于IE,因为我们的公司在Chrome上仍然是50/50,这是一个交易破坏者。


(博客是名为Tallan - 文章,为Sharepoint创建一个Mulit Column显示模板 - 也不能发布链接。)


任何建议或支持都将不胜感激。我希望这是一个快速修复,但谁知道。




解决方案


请参考下面的演示编辑两行搜索显示模板,并确保不删除必要的部分,以免它抛出异常:


SharePoint - 内容搜索Web部件显示模板变得简单 - Wiki页面


谢谢


最好的问候


Hi all,

Novice at HTML, which I'm sure is the main issue. I'm looking for a way to get the search results web part to display more compactly. I don't need any extra columns or anything, just looking to get rid of as much white space as possible since even the two line option takes up a full scroll with 10 documents showing. I'm opting for the search results web part vs. a static set of hyperlinks because I do want it to update dynamically.

My first thought was to edit the Two lines item display template to try to do the reverse of what most of the other posts do, which is to remove all references to the second line (vs. copying/pasting to add more managed properties to the view.) I'm coming up with an error when I switch to my newly created template, though: Item_Skinny.html: Unexpected end of file while parsing Comment has occurred. Line 66, position 1..

Which, there isn't a line 66. Maybe I've just deleted too much or too little from the two lines html copy. Also, I'm not "verified" yet so I can't post code?

The other alternative (that I like a lot) is to sort it into two columns of 5 documents each. Beautiful tutorial/results on this blog, but it says it won't work with IE, which is a deal breaker since our company is still 50/50 on Chrome.

(The blog is called Tallan - Article, Create a Mulit Column Display Template for Sharepoint--Can't post links yet, either.)

Any advice or support would be greatly appreciated. I'm hoping it's a fast fix, but who knows.


解决方案

Hi,

Please refer the demo below to edit the two lines search display template and make sure not remove the necessary part so that it won't throw exception:

SharePoint – Content Search Web Part Display Templates Made Simple – Wiki Pages

Thanks

Best Regards


这篇关于内容搜索Web部件的紧凑显示模板(CSWP)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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