在具有变体的共享点发布网站中自定义面包屑
我有一个具有变体的 Sharepoint 发布网站。 默认情况下,面包屑显示如下:
Variation Root > 英文网站> 某些页面 我想要显示的是: “家”> 某些页面,其中主页指向英文站点根目录。
有没有办法在不创建自定义服务器控件的情况下实现此目的?
I have a Sharepoint publishing site with variations.
The breadcrumb by default shows this:
Variation Root > English Site > Some Page
What I want to display is:
"Home" > Some Page, where Home points to the English site root.
Is there a way to achieve this withouth creating a custom server control to do that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您知道确切的级别数,则可以使用 SiteMapPath,例如:
否则,SiteMapPath 总是直接返回当前正在使用的 SiteMapProvider,并且您可能可以挂钩 SiteMapPath 的渲染并进行检查,例如:
这将使您使用 SiteMapPath不显示根节点(和第一个分隔符)。
如果希望您的节点显示“Home”,您可以绑定另一个值,例如:
如果描述具有将显示的“Home”值。
If you know the exact number of levels you can use a SiteMapPath like:
Otherwise the SiteMapPath always goes direcly agains the SiteMapProvider currently in use and you can probably hook into the rendering of the SiteMapPath a do a check, like:
that will make you SiteMapPath not showing the rootnode (and the first separator).
and if would like your node to display "Home" you can bind against another value, something like:
if description has a value of "Home" that will be shown.
最近,我创建了几个新的菜单控件来解决这个问题。 我的控件接受自定义 ~Variation/ 标记作为起始节点,以便您可以创建从变体的主页而不是网站集的根开始的面包屑。
您可以找到更多信息@ http://blog.mastykarz.nl/templates -based-menu-control-sharepoint/
Just recently I have created a couple of new menu controls which address this issue. My controls accept the custom ~Variation/ token as the StartingNode so that you can create a breadcrumb that starts with the home of your variation rather than the root of your Site Collection.
You can find more information @ http://blog.mastykarz.nl/templates-based-menu-control-sharepoint/