如何修改 Sitefinity 的面包屑导航控件?

发布于 2024-10-06 19:20:35 字数 192 浏览 1 评论 0原文

我需要将 sitefinity 的面包屑从:

Home

修改为:

Home >

因此,如果面包屑位于根页面上,则需要有 >在它之后。 我是一个绝对的初学者,所以慢慢来吧! (使用版本 3.7)

问候 彼得

I need to modify sitefinity's breadcrumbs from this:

Home

to this:

Home >

So if the breadcrumb is on the root page, it needs to have the > after it.
Im an absolute beginner, so go easy on me! (using version 3.7)

Regards
Peter

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

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

发布评论

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

评论(2

葬シ愛 2024-10-13 19:20:35

我过去遇到过类似的问题,并通过创建一个嵌入了面包屑控件的自定义用户控件来解决它。这允许您在后面的代码中添加自己的自定义逻辑,以根据需要显示或隐藏内容:

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="BreadcrumbControl.ascx.cs" Inherits="UserControls_Internal_BreadcrumbControl" %>  
<%@ Register TagPrefix="sfweb" Namespace="Telerik.Cms.Web.UI" Assembly="Telerik.Cms.Web.UI"  %>  

    <asp:HyperLink ID="lnkHome" runat="server" NavigateUrl="/" Text="My Home Page" /> »    
    <sfweb:Breadcrumb ID="bCrumb" runat="server" PathSeparator=" » " />  

在这里您可以隐藏主页上的面包屑,显示主页超链接,您可以自定义该超链接以显示您需要的任何内容。

可能有更好的方法来做到这一点,但这是我能想到的最快、最简单的方法。

希望这有帮助!

I had a similar problem in the past and solved it by creating a custom user control with the breadcrumb control embedded within it. this allows you to add your own custom logic in the code behind to show or hide things as necessary:

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="BreadcrumbControl.ascx.cs" Inherits="UserControls_Internal_BreadcrumbControl" %>  
<%@ Register TagPrefix="sfweb" Namespace="Telerik.Cms.Web.UI" Assembly="Telerik.Cms.Web.UI"  %>  

    <asp:HyperLink ID="lnkHome" runat="server" NavigateUrl="/" Text="My Home Page" /> »    
    <sfweb:Breadcrumb ID="bCrumb" runat="server" PathSeparator=" » " />  

here you can hide the BreadCrumb on the home page, showing the homepage hyperlink, which you can customize to show whatever you need.

There may be a better way to do this, but this was the fastest, easiest way I could figure out to do it.

hope this was helpful!

预谋 2024-10-13 19:20:35

您可以轻松更改模型分隔符。您需要编辑面包屑,单击高级按钮并找到 NodeSeparatorMarkup 字段。

就我而言,我把>>而不是 >

»;

You can easily change the mockup separator. You need to edit the Breadcrumb, click on the advanced button and find the NodeSeparatorMarkup field.

In my case I've put >> instead of >

<span class='sfBreadcrumbNodeSeparator'>»</span>;

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