Reader small image

You're reading from  Learning Bootstrap 4 - Second Edition

Product typeBook
Published inAug 2016
Reading LevelIntermediate
PublisherPackt
ISBN-139781785881008
Edition2nd Edition
Languages
Right arrow
Author (1)
Matt Lambert
Matt Lambert
author image
Matt Lambert

Matt Lambert is a designer and developer with 15+ years of experience. He currently works full-time as a Senior Software Engineer for CA Technologies in Vancouver, BC, Canada. In his free time he is an author, artist, and musician. In 2005, Matt founded Cardeo Creative, which is a small web design studio based in Vancouver. He works with a select list of clients on a part-time basis while producing his own products on the side. To date, Matt has self-published 3 additional development books titled: Mastering Bootstrap, CSS3 Handbook, and the Freelance Startup Guide.
Read more about Matt Lambert

Right arrow

Adding Breadcrumbs to a page


The Breadcrumbs component is a pretty easy one to use in Bootstrap. Let's check out the code for how to render one:

<ol class="breadcrumb"> 
  <li><a href="#">Home</a></li> 
  <li><a href="#">Page 1</a></li> 
  <li class="active">Page 2</li> 
</ol> 

As you can see, the code for this component is pretty basic, let's review it:

  • The Breadcrumb component uses an ordered list or <ol> tag as its base.

  • Within the ordered list, you simply just need to create a list of links. The last item in the list should have a class of .active on it.

Adding Breadcrumbs to the Blog post page

For this example, let's actually add some Breadcrumbs to our Blog post page template. Open up blog-post.ejs and add the following code after the container <div> at the top:

<div class="row m-t-1"> 
    <ol class="breadcrumb"> 
      <li><a href="#">Home</a...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Learning Bootstrap 4 - Second Edition
Published in: Aug 2016Publisher: PacktISBN-13: 9781785881008

Author (1)

author image
Matt Lambert

Matt Lambert is a designer and developer with 15+ years of experience. He currently works full-time as a Senior Software Engineer for CA Technologies in Vancouver, BC, Canada. In his free time he is an author, artist, and musician. In 2005, Matt founded Cardeo Creative, which is a small web design studio based in Vancouver. He works with a select list of clients on a part-time basis while producing his own products on the side. To date, Matt has self-published 3 additional development books titled: Mastering Bootstrap, CSS3 Handbook, and the Freelance Startup Guide.
Read more about Matt Lambert