从 Web 部件读取 SharePoint 中的全局导航

发布于 2024-09-03 17:44:49 字数 99 浏览 0 评论 0原文

是否可以读取所有子站点的全局导航并显示应位于母版页中的 Web 部件中的项目(链接或类别)?

不要忘记全局导航可以在设置中编辑,所以我不能只在页面和子站点上循环。 :(

Is it possible to read the Global Navigation of all the sub sites and display the items (links or category) from a Web Part that should be in a master page?

Don't forget that the global navigation can be edited in the settings, so I can't just loop on pages and sub sites. :(

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

比忠 2024-09-10 17:44:49

您可以使用以下方式阅读导航:
SPNavigationNodeCollection navNodes = web.Navigation.QuickLaunch;

You can read the navigation using :
SPNavigationNodeCollection navNodes = web.Navigation.QuickLaunch;

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文