PHP Build a Basic PHP Website Listing and Sorting Inventory Items Breadcrumbs

Cliff Jackson
Cliff Jackson
2,886 Points

Breadcrumbs not showing on preview??

When i preview the page in the browser the breadcrumbs section is not showing like on the video. Should there be an include file on the catalog.php page for details.php which contains the breadcrumbs section...this was not shown on the video?

Michel Ribbens
Michel Ribbens
18,417 Points

you need to update the first function in the function.php file a bit so all the links work.

had the same problem but just found out that there is a teacher's note about it: https://teamtreehouse.com/library/build-a-basic-php-website/listing-and-sorting-inventory-items/displaying-item-details

I personally think her code is very messy so I've changed it a bit the get rid of all the unnecessary stuff. this works and looks a lot clearer to me

function get_item_html($id, $item) { $output = "<li> <a href='details.php?id=$id'> <img src='$item[img]' alt='$item[title]'> <p>View Details</p> </a> </li>"; return $output; }

1 Answer

Cliff Jackson
Cliff Jackson
2,886 Points

I did paste the code mentioned the other problem i have is i get two images instead of one on the details 101 page, don't know why this is?