SharePoint 2010 自定义面包屑,仅更改 HTML
我需要改变面包屑在共享点中的外观。请注意,数据源仍然是 sharepoint,但我需要生成与 sharepoint 显示的 html 略有不同的 html。
例如,如果您位于自定义列表中,sharepoint 将显示为 site >自定义列表>所有项目。
我需要显示站点、自定义列表和所有项目(从共享点获取的项目没有变化)。唯一的变化是,用户界面将通过 html ul 标签和一些自定义 css 的组合生成?
有人可以建议我最好的方法吗?
谢谢
I have a requirement for changing the way bread crumbs looks in sharepoint. Please note that the data source will still be sharepoint but i need to generate the html little differently than the one displayed by sharepoint.
for example, if you are in a custom list,sharepoint displays as site > custom list > all items.
I neeed to display site, custom list and all items (no change in the items that are got from sharepoint). The only change will be, the user interface will be generated with a combination of html ul tags with some custom css?
Can someone suggest me the best approach?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
显示面包屑的
SiteMapPath
控件的视觉外观可以通过设置控件的属性或配置可用于控件的模板来修改。我认为CssClass
和NodeTemplate
属性正是您所需要的。修改您需要创建一个继承自
SPContentMapProvider
的自定义站点地图提供程序。The visual appearance of the
SiteMapPath
control that displays a breadcrumb can be modified by setting the attributes of the control or by configuring the templates that are available for the control. I think that theCssClass
andNodeTemplate
properties is what you need.To modify the content of the breadcrumb you need to create a custom site map provider inheriting from
SPContentMapProvider
.