自定义 SharePoint 面包屑导航
我需要帮助尝试自定义 SharePoint 显示的面包屑导航。我在页面库中创建了两个 .aspx 页面,名为 search.aspx 和 products.aspx。来自 search.aspx 的链接指向 products.aspx 页面,我希望面包屑导航能够反映此结构,以便面包屑如下所示: 首页>搜索>产品
以及“搜索”链接到 search.aspx 的位置。
但是,当我导航到 products.aspx 页面时,面包屑看起来像: 首页>产品。
我认为通过配置网站导航结构,这在 SharePoint 中很容易做到,但根据我对 Internet 的研究,人们建议禁用 SharePoint 面包屑并创建一个自定义 Web 部件来创建这些链接并模拟功能。如果没有,其他人建议创建自定义站点地图提供程序。为了实现我所描述的功能,这些似乎需要做很多工作。
查看母版页,有一个包含以下内容的面包屑占位符,我的页面继承自:
任何帮助/建议将不胜感激。
谢谢, 本
I need help trying to customize the Breadcrumb navigation displayed by SharePoint. I have created two .aspx pages in the Pages Library named search.aspx and products.aspx. A link from search.aspx leads to the page products.aspx, and I want the breadcrumb navigation to reflect this structure so that the breadcrumb looks as follows:
Home > Search > Products
and where "Search" links to search.aspx.
However, when I navigate to the products.aspx page, the breadcrumb instead looks like:
Home > Products.
I’d think this would be something easy to do within SharePoint by configuring the site navigation structure, but from my research on the Internet people suggested disabling SharePoint breadcrumbs and creating a custom web part that creates these links and simulates the functionality. If not, others recommend creating a custom sitemap provider. These seem to be a lot of work just to achieve the functionality I described.
Looking in the masterpage, there is a breadcrumb placeholder with the following content, with which my pages inherit from:
Any help/advice would be greatly appreciated.
Thanks,
Ben
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以在 MasterPage 中自定义 asp:SiteMapPath 控件,这个其他问题有相关信息
You can customize the asp:SiteMapPath control in the MasterPage, this other question has info on it