Purpose of document

When I starting building this site, I decided that I wanted to build a simple breadcrumb generator that would calculate for me where I was at and how to go back. I didn't want to have to hard code any urls in the view. In fact, if I could put it in the template (which I did) the better so I only have to put in the code once.

Usage: In the view, type in 'echo Breadcrumbs::factory()->control()'. I put this inside a div so I could style it how I liked. By putting it in the template, you only have to call it once and you're done. If you don't want it to show on the home page, put in a css file that sets 'display:none' on the home page for the breadcrumb div.

This module will detect the current directory (if a directory is used), controller, action, and id including multiple ids. For example, '/directory/controller/action/id/id/id/etc' will display a breadcrumb of 'Home > directory > controller > action > id > id > id > etc'. Send me a message if you need help setting up directories and multiple ids in the routing in bootstrap.php.

There is one assumption/limitation to this module. The default page has to be either 'home' and/or 'index' and the default action is 'index'. In most cases, this isn't an issue unless the designer decides to use unconventional naming conventions.

Download a zip file of this module here