Jump to content

[SOLVED] Shorten breadcrumb


Recommended Posts

Hello everyone !

I need help for setting the breadrumb length.

Because, i have too many subcategories, on the product page, the breadcrumb is too long and goes to 2 or 3 lines. I want to set breadrumb in one line, using "..." instead of subcategories name.

Is it possible?

Thanks in advance !

Edited by fishingnet (see edit history)
Link to comment
Share on other sites

I'm not quite sure why you want to use breadcrumbs then turn around and shorten (i.e. remove) them. It seems to defeat the purpose of the breadcrumbs but nevertheless here is what you can do.

 

locate your breadcrumbs.tpl file (themes/yourtheme/breadcrumbs.tpl).

 

Now locate the following piece of code:

 

{if !$path|strpos:'span'}
  <span class="navigation_page">{$path}</span>
 {else}
  {$path}
 {/if}

 

Next replace it with this code:

 

{if !$path|strpos:'span'}
  <span class="navigation_page">{$path|strip_tags|truncate:20:'...'}</span>
 {else}
  {$path|strip_tags|truncate:20:'...'}
 {/if}
{/if}

 

You will need to change '20' to whatever number fits your needs.

 

Hope that helps!

 

Marty Shue

  • Like 1
Link to comment
Share on other sites

Thanks Marty for your fast reply!

I'm not sure if I spelled correctly! English is not my native language! Sorry for that!

 

What I want, is to use breadcrumb, but do not want to exceed a single line.

I attach a screenshot to get a better understanding!

 

My breadcrumb look like this:

Home > Pescuitul crapului > Nade, momeli crap > Arome, atractanti, lichide nutritive > Aroma SENZOR BANANA

& CAPSUNA - 30ml

 

...and should look like this:

Home > Pescuitul crapului > ... > ... > Aroma SENZOR BANANA & CAPSUNA - 30ml.

 

and, very important ! The "..." must be linkable for "Nade, momeli crap" and "Arome, atractanti, lichide nutritive"

 

Do you think that is possible?

 

Thank you again !

Bogdan

post-372465-0-20350500-1347717545_thumb.jpg

Link to comment
Share on other sites

  • 3 weeks later...
  • 4 weeks later...
  • 2 months later...

Hello again :)

 

If you do not wish to shorten the breadcrumbs (as mentioned in my earlier post) you can add the following to your CSS. Add the following to your global.css on line #649

 

.breadcrumb {
   background: url("../img/bg_breadcrumb.png") repeat scroll left top transparent;
   color: #FFFF00;
   font-size: 9px;
   height: 30px;
   line-height: 30px;
   overflow: hidden;
   padding: 0 0 0 5px;
}

 

This will hide the overflow and fix your problem.

 

Hope that helps!

 

Marty Shue

  • Like 1
Link to comment
Share on other sites

IT HELPED A LOT ! ! !

IT SOLVED MY PROBLEM !

Now the page i mentioned above is looking great !!!!! And the rest (with long name of products) are the same ! BEAUTIFUL !!!!

THANK YOU SO MUCH, MARTY !!!! You are a MASTER !!!

I will set this topic as being solved !

Thank you again !

Bogdan

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...