Styling built-in Sitefinity breadcrumb with current page title?
Below is my hard coded breadcrumb HTML that renders properly with my style sheet.
<
div
id
=
"title-bar"
>
<
div
id
=
"title-bar-center"
class
=
"center"
>
<
div
id
=
"breadcrumbs"
>
<
a
href
=
"/home/"
>Home</
a
> »
<
a
href
=
"/home/brands"
>Brands</
a
> »
<
strong
>Our Brands</
strong
>
</
div
>
<
h2
id
=
"start"
>Our Brands</
h2
>
</
div
>
</
div
>
I want to embed the built-in Sitefinity Breadcrumb nav control and be able to grab the current page title to replace the text of "Our Brands" in the h2 tag above. When I do, like with the below code, no page title appears under the breadcrumb. Any suggestions please?
<
div
id
=
"title-bar"
>
<
div
id
=
"title-bar-center"
class
=
"center"
>
<
div
id
=
"breadcrumbs"
>
<
sf:SitefinityLabel
id
=
"BreadcrumbLabel"
runat
=
"server"
WrapperTagName
=
"span"
HideIfNoText
=
"true"
CssClass
=
"sfBreadcrumbLabel"
/>
<
telerik:RadSiteMap
runat
=
"server"
ID
=
"Breadcrumb"
>
<
DefaultLevelSettings
ListLayout-RepeatDirection
=
"Horizontal"
Layout
=
"Flow"
/>
</
telerik:RadSiteMap
>
<!--This is the closest to a page title, 'SelectedPageTitle' I could find in my list of fields available in the breadcrumb template editor screen. -->
</
div
>
<
h2
id
=
"start"
>
<
sitefinity:TextField
runat
=
"server"
DisplayMode
=
"Read"
Value='<%# Eval("SelectedPageTitle")%>' />
</
h2
>
</
div
>
</
div
>
Sitefinity 5 if it makes any diff. Tnx.
Corby, did you figure out how to do this? I have the same issue.
I am having the same problem. How can I access the template properties in the template? eg.SelectedPageTitle.
it is working for the CSS Class with <%= this.GetCssClass() %>
Unfortunatelly <%= this.SelectedPageTitle() %> is not working.
Hello all,
There is a blog post by Slavo Ingilizov showing how to extend the breadcrumb widget here:
Including item titles in the Sitefinity breadcrumb
It describes how to extend it to display page`s title in both webforms and MVC widgets.
Hope this helps.
Regards,
Vassil Vassilev
Telerik