Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP Build a Basic PHP Website (2018) Listing and Sorting Inventory Items Breadcrumbs

Cliff Jackson
Cliff Jackson
2,887 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,887 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?