What I usually do, as a rule of thumb: everything that is business logic goes inside a model. Helpers are usually good for reusable view logic. So, when you’re retrieving breadcrumb data, do it in a model and pass it to a view. If you need to wrap breadcrumb data into HTML use a helper.
// Controller: fetch breadcrumbs. Typically, this would return an array of objects or something
$breadcrumbs = $this->breadcrumb_m->get();
$this->load->view('some_view', array('breadcrumbs' => $breadcrumbs));
// Helper
/**
* Wrap breadcrumbs in HTML and return it
* @param array $breadcrumbs
* @return string
*/
function wrap_breadcrumb ($breadcrumbs)
{
if (! is_array($breadcrumbs) || ! count($breadcrumbs)) return '';
$retval = '<ul>' . PHP_EOL;
foreach ($breadcrumbs as $breadcrumb)
{
$retval .= '<li>' . anchor($breadcrumb->url, $breadcrumb->title) . '</li>' . PHP_EOL;
}
$retval .= '</ul>' . PHP_EOL;
}
// View file: all you have to do here is echo helper function and pass in breadcrumb array
echo wrap_breadcrumb ($breadcrumbs);