/ Published in: PHP
Function to print breadcrumb links
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/* * Function to create breadcrumbs (Even for pods) * */ function loopCrumb(){ $url_string = $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"]; $i=1; foreach ($url_explode as $value) { if($value != ""){ if ($i === 1){ $title = "Home"; } $crumb = '<a href="http://'.$url.'">'.$title.'</a> > '; echo $crumb; $i++; } } }