Hello,
Based on the information provided on the post below, I have successfully been able to change the look of the last breadcrumb (the current page).
viewtopic.php?f=44&t=14220&p=61111&hilit=breadcrumbs#p61111
Now, I'd like to remove the link from the last category displayed (the current category).
How I can make the last breadcrumb not a link?
Example:
Breadcrumb: Home > Toys for Girls > Dolls
Desired outcome: "Dolls" is not a link
Thanks!
Breadcrumbs - Remove Last Link
Re: Breadcrumbs - Remove Last Link
Give a try by this code
In CategoryBreadCrumbs.ascx replace ItemTemplate with this one
and add this function in CategoryBreadCrumbs.ascx.cs
In CategoryBreadCrumbs.ascx replace ItemTemplate with this one
Code: Select all
<ItemTemplate>
<asp:HyperLink ID="BreadCrumbsLink" runat="server" NavigateUrl='<%#UrlGenerator.GetBrowseUrl((int)Eval("catalogNodeId"), (string)Eval("name"))%>'
Text='<%#Eval("Name")%>' Visible='<%# !IsLastItem() %>'></asp:HyperLink>
<asp:Label ID="LastCategoryBreadCrumbItem" Visible='<%# IsLastItem() %>' runat="server"
Text='<%#Eval("Name")%>'></asp:Label>
</ItemTemplate>
Code: Select all
int i = 0;
protected bool IsLastItem()
{
i++;
return (i == (BreadCrumbsRepeater.Items.Count));
}
hope this helps!
__________________
s_ismail
AbleCommerce Customization
Free Plugins and Add-Ons
AbleCommerce Plugins and Add-Ons
Plugables Blog
__________________
s_ismail
AbleCommerce Customization
Free Plugins and Add-Ons
AbleCommerce Plugins and Add-Ons
Plugables Blog
Re: Breadcrumbs - Remove Last Link
Thanks for your reply. I tried out your suggested code and it did not appear to make any changes. The breadcrumb path still had a link for the current page. We're still working on getting this done. Do you have any other suggestions?
Thanks!
Thanks!