Jump to content

[SOLVED] Breadcrumb in Header not working!


Recommended Posts

Hi all,

THis has been asked before but no good response or solution has com from it.
So I made this new post to give it some new attention.

When I place the breadcrumb in the header with this code:

 {include file=$tpl_dir./breadcrumb.tpl}



The breadcrumb only shows; Home and nothing behind it.
I have looked on every page but only Home will show?

If you know how to do this pleas let us know this question is almost 1 year old and a lot of people want to know it!

Thanks in advance!
denli

Link to comment
Share on other sites

  Quote
Hi all,

THis has been asked before but no good response or solution has com from it.
So I made this new post to give it some new attention.

When I place the breadcrumb in the header with this code:
 {include file=$tpl_dir./breadcrumb.tpl}



The breadcrumb only shows; Home and nothing behind it.
I have looked on every page but only Home will show?

If you know how to do this pleas let us know this question is almost 1 year old and a lot of people want to know it!

Thanks in advance!
denli



Hi. You try thats rocky says?
Link to comment
Share on other sites

  Quote
Did you write something like the following before calling the template?

{capture name=path}{l s='Breadcrumb item'}{/capture}



Hi and thanks for your reply!

I pasted the code before: {include file=$tpl_dir./breadcrumb.tpl}
Looks like this: {capture name=path} {l s='Breadcrumb item'}{/capture}{include file=$tpl_dir./breadcrumb.tpl}

Is that Right? it doesn't work yet but I do get this: Home > Breadcrumb item

So something is happening but I think I am doing it wrong could you tell me where to put the code and how it should look?

Thanks in advance

Denli
Link to comment
Share on other sites

  Quote
Yes, you have done it right. This code adds an item to the breadcrumb bar. Were you wanting something different?


Yes I wanted the breadcrumb to function normally in the header but it doesn't it only shows Home and when I use your suggestion it shows; home > breadrumb item.

But I want it to work as the way it does when its in the center_column.

Thanks for your reply I appreciate it very much.
Link to comment
Share on other sites

I've had a look at your site. It appears you have deleted the breadcrumb from all the individual pages and tried to add it to the header.tpl. This won't work, since it is the individual TPL files that have the variables to display the breadcrumb bar correctly. You need to move the breadcrumb code back to the individual pages and then use CSS to absolutely position the breadcrumb bar in the header.

Link to comment
Share on other sites

  Quote
I've had a look at your site. It appears you have deleted the breadcrumb from all the individual pages and tried to add it to the header.tpl. This won't work, since it is the individual TPL files that have the variables to display the breadcrumb bar correctly. You need to move the breadcrumb code back to the individual pages and then use CSS to absolutely position the breadcrumb bar in the header.



Thanks Rocky you rock ;)

I have done the above and the breadcrumb is where I want it now thanks.

I have used the : position: absolute; and played with the margin until it was where I wanted it.
Sometimes the solution is so simple!

Thanks a lot I will put [sOLVED] on this post.
Link to comment
Share on other sites

  • 1 month later...

In the global.css for your theme, edit the .breadcrumb attributes. Here is an example of what I changed mine to.

Adjust the margin top and left to move up and down/left right. To go up use negative numbers, as I have, to go right you have to go over 100.

/* breadcrumb.tpl */
.breadcrumb {
font-size: 1em;
color:#FFFFFF;
position:absolute;
margin-top:-75px;
margin-left:120px;
}

Link to comment
Share on other sites

  Quote
Hi Ciscowrig, thanks for your reply, but my breadcrum still now working, sometimes it just display


Home >> The item, not
Home >> Category >> Subcategory >> The ITem


may be you have backgroud nearly of the same color - play with change of color:#FFFFFF
Link to comment
Share on other sites

  • 1 month later...
  Quote
Hi Ciscowrig, thanks for your reply, but my breadcrum still now working, sometimes it just display
Home >> The item, not
Home >> Category >> Subcategory >> The ITem

I have this problem, too. That's when I chose to View the product from some module in the Home page (e.g : Home feature product, Block special,...), then the breadcrumb just show
Home>>The Item, and nothing more, instead of
Home >> Category >> Subcategory >> The Item
(It's not the matter of text-color) As the result, the block "Product in the same category" go wrong, it'll show products in all category. I think the path of the product was lost. We need edit something for the breadcrumb ? Can anybody fix this ?
I'm using final 1.2.5, block homefeatureproduct 0.92.
Link to comment
Share on other sites

Yes I did. I set the subcategory for every product. Like I said, when I chose a product step by step from the block CATEGORIES, the breadcrumb works correctly. But when I chose a product from a module in the Home page, it doesn't show the full path. My host is unavailable now so I can't upload and give you a demo :(

Link to comment
Share on other sites

Oh I'm wasting your time Rocky. I found the answer, from here
http://www.prestashop.com/forums/viewthread/31336/configuring___using_prestashop/some_category_only_shown_on_ocassions

that's the Default catagory for every Product. I haven't understood the importance of DEFAULT CATEGORY. Now I do. But I wonder why the Breadcrumb doesn't detect the product path automatically ?

Link to comment
Share on other sites

Prestashop does detect the product path. If you put a product in multiple categories and click on the product from each of these categories, it will display the category you came from in the breadcrumb. It is only if you go to the product directly without going through the category list that it uses the default category.

Link to comment
Share on other sites

  • 6 months later...

I did this

{capture name=path}{l s='Breadcrumb item'}{/capture} {include file=$tpl_dir./breadcrumb.tpl}

posting that in my left column (that's where I want it to appear) that's the only thing I've done.

I'm still getting the breadcrumb item in the capture, even as I click on each category. I have the categories set to Home as the parent, I don't see how to have another option. In the other thread referenced, it's talking about the products.

Also, I'm getting the breadcrumbs in both places... how do I only get it in the left column?

TIA

Link to comment
Share on other sites

  • 4 months later...

Hi, I added the header {capture name = path} {ls = 'Breadcrumb item'} {/ capture} {include file = $ tpl_dir. / breadcrumb.tpl}, but it did not work and writes the "Home> Breadcrumb item" as should I do. Please help.

It's a classic header version 1.3.7. What is wrong with this line?

Sorry for my English.

Link to comment
Share on other sites

  • 7 months later...
  • 3 months later...
  • 5 months later...
  • 3 weeks later...

Hi all,

i have a problem with my breadcrumb. The breadcrumb didn't work when i copy the link in my browser and i paste it in another tab.

There are something amazing to, the link seems to be www.mywebsite.com/yyyy-my-product-xxx.html not www.mywebsite.com/product.phph?id_product=xxx

 

Someone could help me please?

Thanks

Link to comment
Share on other sites

  • 4 months later...
  On 1/26/2010 at 5:26 PM, Ciscowrig said:

In the global.css for your theme, edit the .breadcrumb attributes. Here is an example of what I changed mine to.

 

Adjust the margin top and left to move up and down/left right. To go up use negative numbers, as I have, to go right you have to go over 100.

 

/* breadcrumb.tpl */

.breadcrumb {

font-size: 1em;

color:#FFFFFF;

position:absolute;

margin-top:-75px;

margin-left:120px;

}

 

The links for the breadcrumbds have gone when ir goes above the left column

Link to comment
Share on other sites

  On 1/26/2010 at 5:26 PM, Ciscowrig said:

In the global.css for your theme, edit the .breadcrumb attributes. Here is an example of what I changed mine to.

 

Adjust the margin top and left to move up and down/left right. To go up use negative numbers, as I have, to go right you have to go over 100.

 

/* breadcrumb.tpl */

.breadcrumb {

font-size: 1em;

color:#FFFFFF;

position:absolute;

margin-top:-75px;

margin-left:120px;

}

 

The links for the breadcrumbds have gone when ir goes above the left column

Link to comment
Share on other sites

  • 3 months later...
×
×
  • Create New...