Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Designing Interfaces in PHP!
You have completed Designing Interfaces in PHP!
Preview
To finish our site, we need to add some navigation as well a featured image for our pages. We'll loop through a new instance of a class and check and object for a specific class.
HTML for Featured Image
<!-- Begin page Image -->
<div id="myCarousel" class="carousel slide" data-ride="carousel">
<div class="carousel-inner" role="listbox">
<div class="carousel-item active">
<img class="first-slide" src="assets/img/<?php //featureImage ?>" alt="First slide">
</div>
</div>
</div>
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
Where it says add page navigation,
we're going to loop through our pages.
0:00
Foreach (new Pages($repo) as $page).
0:05
For each page,
we're going to add a list item.
0:17
This list item will link to the page slug.
0:21
Echo '<li class="nave-item">.
0:24
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up