PDA

View Full Version : Changing Breadcrumbs



SM-John
02-01-07, 04:05 AM
Hey everyone. I am integrating and customizing my v3 installation and it is looking great. The only issues are the breadcrumbs and integrating Kayako. Where do I go to change the URL's provided in the breadcrumb and can I remove "Support" as the top Breadcrumb?

Thanks in advanced!

DataHosts
02-01-07, 04:51 AM
homepage.tpl is the file that holds all main page links for the system. You can add, delete, or edit this and get the results you are looking for....I believe.

Matt
02-01-07, 08:32 AM
You can change the text displayed in the breadcrumbs inside the language file, for example lang/English.txt

SM-John
02-01-07, 06:35 PM
Not what I am looking to do, even though that is nice. I want to change the breadcrumbs. So that the divider isn't a ">" and also so the main breadcrumb (which is "Support") doesn't go to your support page. Or if I could delete the "Support" breadcrumb all together that would be nice.

Matt
02-01-07, 08:21 PM
You'd need to do some string manipulation on the breadcrumbnav template item. Take a look at the Smarty documentation and look in particular at the string replace functions. You'll need to do replacements for > and index.php which is the homepage url.

SM-John
02-01-07, 08:42 PM
Great, so now I have to learn how to use Smarty Templates to remove one thing from the breadcrumbs. When I figure this out, I will make tutorial for people in my position.

Matt
02-01-07, 08:45 PM
Well it's not that difficult really:

{$breadcrumbnav|replace:'>':'#!->'}

SM-John
02-01-07, 08:53 PM
Yes it really is, that does not work.

It turns the #!-> into a link and that replace function doesn't support ». Thanks.

Update:

Fixed by using this:

{$breadcrumbnav|replace:' >':' »'}

Thanks.

Matt, can you replace more than 1 string though, how would that look? I don't see it in the documentation.

muchos
04-27-07, 10:19 AM
how / where do i execute this?

trine
04-27-07, 12:40 PM
how / where do i execute this?

Simply find {$breadcrumbnav} in your header template, then replace it with the code above

Iceman
04-27-07, 01:14 PM
Matt, can you replace more than 1 string though, how would that look? I don't see it in the documentation.

Yup, try this...

{$breadcrumbnav|replace:'string1':'string2'|replac e:'string3':'string4'} http://smarty.php.net/manual/en/language.combining.modifiers.php
Cheers,
Paul

skshost
04-27-07, 07:16 PM
you can use that to replace "Support" with nothing if you'd like.

gbrennae
08-29-12, 05:44 PM
Try Something like this to transform for bootstrap:

<ul class="row breadcrumb span12">{$breadcrumbnav|replace:'</a> >':'</a><span class="divider">/</span></li>'|replace:'<a href=':'<li><a href='}</li></ul>

kanum
03-09-13, 05:29 PM
Try Something like this to transform for bootstrap:

<ul class="row breadcrumb span12">{$breadcrumbnav|replace:'</a> >':'</a><span class="divider">/</span></li>'|replace:'<a href=':'<li><a href='}</li></ul>

Thanks! Work great.

One question you know how can I add a Icon only to Portal Home?

disgruntled
03-11-13, 10:35 PM
CSS File: adjust to requirements.

Add
.home-icon { margin-left: -10px; margin-top: -10px; height: 10px; width:10px;}

header.tpl

Edit to
<ul>
<li><img class="home-icon" src="someimage.png"><a href="{if $loggedin}clientarea{else}index{/if}.php">{$LANG.hometitle}</a></li>
</ul>

All your doing is adding and image and then adjusting its size and position, i would suggest you use an image a little larger than you need, and down size it, rather than smaller and up size, that is if you cant find/make an image that is the size you want, it also means a slightly larger image will allow for more scalability if you later alter the font size of the breadcrumbs