Hi, Sorry if this is duplicate post, I've had a good search but could not find an answer. I'm looking to remove the link from the last breadcrumb on my information pages.
I.E. For my FAQ page, my breadcrumb would be "Home >> FAQ". I want to keep the 'FAQ' part but remove the link so it's just text.
I've edited my category and product TPL files to actually remove the last breadcrumb as I think this look neater, but for the pages with only two breadcrumbs, I think it looks odd to remove and just have "Home" so thought it better to remove the link if possible.
Thanks in advance.
I.E. For my FAQ page, my breadcrumb would be "Home >> FAQ". I want to keep the 'FAQ' part but remove the link so it's just text.
I've edited my category and product TPL files to actually remove the last breadcrumb as I think this look neater, but for the pages with only two breadcrumbs, I think it looks odd to remove and just have "Home" so thought it better to remove the link if possible.
Thanks in advance.
Nope, it doesn't look odd with only 2 breadcrumb items. You can safely remove the link for last item on all pages.
Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com
I didn't say anything about removing the last item. You shouldn't do this anywhere, not only when thre're only 2 items.
So yes, remove a link from last breadcramb and it will look great. Since you're familiar with TPL files, you'll do it easily. Not sure, what's your issue.
So yes, remove a link from last breadcramb and it will look great. Since you're familiar with TPL files, you'll do it easily. Not sure, what's your issue.
Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com
Sorry if I didn't make myself clear, despite my being able to remove the breadcrumbs that I didn't need, removing the hyperlinks seems to be more tricky. But.....it seems to have worked now. Just removing the <a href> elements in the TPL. I must not have refreshed the page properly. Thank you,
Add check for last array key:
Code: Select all
foreach ($breadcrumbs as $key => $breadcrumb) {
if ($key == (count($breadcrumbs) - 1)) {
// skip the <a> tag
}
}
Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com
Well... If you edited TPL before, you should've seen this foreach clause already. You just need to edit it a bit.
Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com
Who is online
Users browsing this forum: No registered users and 240 guests