开发者

Overriding default control templates - ListTitleViewSelectorMenu

开发者 https://www.devze.com 2023-02-06 01:20 出处:网络
I am following the example given here to override the default DocumentLibraryForm rendering template MSDN - Override a Default Control Template

I am following the example given here to override the default DocumentLibraryForm rendering template

MSDN - Override a Default Control Template

<SharePoint:RenderingTemplate ID="DocumentLibraryForm" runat="server">
... Custom stuff here ..
</SharePoint:RenderingTemplate>

(Thats the 2007 version, the 2010 version is the same but not complete, it doesn't show the directives)

And that all works just fine. There are lots of other examples on t'internet of overriding control rendering templates.

However I am trying to override things like ListTitleViewSelectorMenu and that isn't working.

<!-- Definition from allitems.aspx -->
<ShareP开发者_运维知识库oint:ListTitleViewSelectorMenu AlignToParent="true" id="LTViewSelectorMenu" runat="server" />


SharePoint:RenderingTemplate can only be used to override defined templates, usually in the generation of forms and list views. I dont think they can be used to replace random controls that are placed on page layouts.

I think i have tried what you are trying do, customise that view dropdown on list layout pages. I have an control that shows it sorted. The way that you replace controls is with a DelegateControl (http://msdn.microsoft.com/en-us/library/ms470880.aspx), but unfortuately ListTitleViewSelectorMenu is not wrapped by a DelegateControl in the standard list layouts. You may have to replace the entire bread crumb.

0

精彩评论

暂无评论...
验证码 换一张
取 消