简体   繁体   English

如何在SharePoint 2013中创建自定义优化面板

[英]How to create a custom refinement panel in SharePoint 2013

As i am bothered by the unability of the OOTB refinement webpart not being able to show the MM translations i decided to try developing a custom refinement webpart (as a custom webpart in Visual Studio). 由于OOTB改进Web部件无法显示MM翻译而困扰,我决定尝试开发自定义改进Web部件(作为Visual Studio中的自定义Web部件)。 Unfortunately, i already bounced my head to a first problem: i can not inherit my webpart from the OOTB one... I just create a new webpart (or visual webpart, none works) and try to inherit but i don't know the namespace... 不幸的是,我已经开始思考第一个问题:我无法从OOTB继承我的Webpart ...我只是创建了一个新的Webpart(或可视化Webpart,无作用)并尝试继承,但是我不知道命名空间...

i tried this: 我尝试了这个:

public class CustomRefinements : Microsoft.Office.server.Search.WebControls.RefinementWebPart 

but i get an error: Reference to type 'DataFormWebPart' claims it is defined in 'Microsoft.SharePOint but it could not be found... 但我得到一个错误: Reference to type 'DataFormWebPart' claims it is defined in 'Microsoft.SharePOint but it could not be found...

Edit: ok i had to use à farm Solution and NOw iT works... 编辑:好吧,我不得不使用àfarm解决方案,现在就可以使用...

Now i can inherit from OOTB webparts but apparantly in 2013 version i need to inherit from RefinementScriptWebPart to have the refinement webpart configuration parameters in web mode. 现在,我可以从OOTB Webpart继承,但是大约在2013版本中,我需要从RefinementScriptWebPart继承以在Web模式下具有优化Webpart配置参数。 I follow the 2010 example from sharepointblogs.be/blogs/timmy/archive/2011/12/13/… but in 2013 the RefinementScriptWebPart class does not have the GetXPathNavigator() function... Anyone has any ideas? 我遵循sharepointblogs.be/blogs/timmy/archive/2011/12/13/…中的2010年示例,但是在2013年,RefinementScriptWebPart类没有GetXPathNavigator()函数...任何人都有想法吗?

I van nog het the refinmentmanager... 我范诺赫特,金融经理。

After a lot of research i concluded that it is not possible to reach a solution this way (inherting from default webparts). 经过大量研究,我得出结论认为不可能以这种方式(从默认Webparts继承)获得解决方案。

I managed to get a solution via a custom Filter for the Refinements http://blog.everydayslaughter.com/2015/07/mui-refinements-panel-in-sharepoint-2013/ 我设法通过针对优化的自定义过滤器获得了解决方案http://blog.everydayslaughter.com/2015/07/mui-refinements-panel-in-sharepoint-2013/

it's not yet ideal but i'm still working on it 它还不理想,但我仍在努力

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

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