Hi all,
what Iam trying to do is to write a small script/condition, that will show only first 2 or 3 levels in a pathway/breadcrumb, cause from that point the pathway is too long . Do you have some ideas how to do it?
Thanks a lot, by
Miro, Slovakia
Show only some levels in a breadcrumb?
Re: Show only some levels in a breadcrumb?
Well a really quick nasty way to do it is to just to change function.breadcrumbs.php (in the plugins directory) to just loop through 2 or 3 interations rather than show the whole path.
So, at about line 113 where you have
you could change the value in the for loop so that it just does 2 items
or however many you want to show.
So, at about line 113 where you have
Code: Select all
# now create the trail (by iterating through the path we built, backwards)
for ($i=count($path)-1; $i>=0; $i--) {
Code: Select all
for ($i=count($path)-1; $i>=count($path)-2; $i--) {
Re: Show only some levels in a breadcrumb?
yes, I got the same idea. maybe I will try to implement it like a parameter. Thanks, bye. Miro