Sitefinity Breadcrumb separator
Is there a way to change the character being used for a separator in the Sitefinity Breadcrumb widget? Currently its "\" but I would like to use "->" instead. I don't see this particular option in the template.
Daer Russell
This did work, however I had to use the JavascriptEmbed Control to add Jquery, and then another one for a separate javascript file. For some reason even though JQuery loaded, any JavaScript that referenced it would not run from the master page. Putting the code in a separate .js file worked just fine.
You don't need jquery, it's just adding to your load time.
If you edit the breadcrumb control in advanced mode there's a property called "NodeSeparatorMarkup", just edit that.
Struggling here with styling the Breadcrumbs widget...
We seek to increase the font size in the widget (Sitefinity version 6.1), trying everything but nothing works.
This is the standard template:
<%@ Control Language="C#" %>
<%@ Register Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Web.UI" TagPrefix="sf" %>
<
div
class
=
"sfBreadcrumbWrp"
>
<
sf:SitefinityLabel
id
=
"BreadcrumbLabel"
runat
=
"server"
WrapperTagName
=
"span"
HideIfNoText
=
"true"
CssClass
=
"sfBreadcrumbLabel"
/>
<
telerik:RadSiteMap
runat
=
"server"
ID
=
"Breadcrumb"
Skin
=
"Sitefinity"
>
<
DefaultLevelSettings
ListLayout-RepeatDirection
=
"Horizontal"
Layout
=
"Flow"
/>
</
telerik:RadSiteMap
>
</
div
>
Yeah there's no way to do inline styles in the markup, they're asp controls which render differently, however it should be easily stylable still
1) Remove the Skin="Sitefinity" and instead give it another name, maybe the name of the site.
2) Inherit from the existing breadcrumb and substitute your own
protected override void CreateChildControls()
base.CreateChildControls();
this.ClientIDMode = System.Web.UI.ClientIDMode.Static;
this.SiteMapBreadcrumb.ClientIDMode = System.Web.UI.ClientIDMode.Predictable;
this.SiteMapBreadcrumb.EnableEmbeddedBaseStylesheet = false; //IMPORTANT
this.SiteMapBreadcrumb.EnableEmbeddedSkins = false; //IMPORTANT
this.SiteMapBreadcrumb.DataBound += SiteMapBreadcrumb_DataBound;
this.SiteMapBreadcrumb.NodeDataBound += SiteMapBreadcrumb_NodeDataBound;
this.CssClass += " clearfix";
protected
override
void
Render(HtmlTextWriter writer)
foreach
(RadSiteMapNode node
in
this
.SiteMapBreadcrumb.Nodes)
if
(node.Text.ToLower() ==
"detail"
|| node.Text.ToLower() ==
"details"
||
//Detail
node.Text.ToLower() ==
"categories"
||
//Browser
node.Text.ToLower() ==
"-in-department"
|| node.Text.ToLower() ==
"departments"
)
//ECOMM
node.Visible =
false
;
node.ToolTip =
""
;
Thanks, Steve.
I ended up following a similar logic.
I've replaced the template's Sitefinity skin with a different skin (called it "Tyre").
Then created a Skin file in App_Themes (within our default theme), called SiteMap.skin.
<%@ Register TagPrefix="telerik" Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" %>
<
telerik:RadSiteMap
runat
=
"server"
Skin
=
"Tyre"
EnableEmbeddedSkins
=
"false"
>
</
telerik:RadSiteMap
>
@font-face
font-family: 'TradeGothicLTStdBold';
src: url('media/tradegothicltstd-bold-webfont.eot');
src: url('media/tradegothicltstd-bold-webfont.eot?#iefix') format('embedded-opentype'),
url('media/tradegothicltstd-bold-webfont.woff') format('woff'),
url('media/tradegothicltstd-bold-webfont.ttf') format('truetype'),
url('media/tradegothicltstd-bold-webfont.svg#TradeGothicLTStdBold') format('svg');
font-weight: normal;
font-style: normal;
.RadSiteMap_Tyre
font: 18px 'TradeGothicLTStdBold', Arial, Verdana, sans-serif;
color: white;
.RadSiteMap_Tyre .rsmLink,
.RadSiteMap_Tyre .rsmTemplate
font: 18px 'TradeGothicLTStdBold', Arial, Verdana, sans-serif;
.RadSiteMap_Tyre .rsmLink:hover
color: #888;
.RadSiteMap_Tyre .rsmLevel2 .rsmLink:hover,
.RadSiteMap_Tyre .rsmThreeLevels .rsmLevel1 .rsmLink:hover,
.RadSiteMap_Tyre .rsmTwoLevels .rsmLevel1 .rsmLink:hover,
.RadSiteMap_Tyre .rsmOneLevel .rsmItem .rsmLink:hover
color: #333;
This works great, I was following your post and things are starting to function. I don't see why Telerik-Sitefinity doesn't make it easier to change these settings. In the options they have a font section, but they don't have a font colour nor a font link, hover, or anything. There is a css option and it does nothing unless you make a new skin and follow the steps above.
Anyway, Nice tutorial :)