Welcome Guest, Not a member yet? Register   Sign In
Code Igniter Breadcrumbs
#11

[eluser]JulianM[/eluser]
I just submitted a simple breadcrumb helper function here: http://ellislab.com/forums/viewthread/93588/

Julian

[quote author="Spaxx" date="1208979404"]Hi.
Is there a library for creating menu breadcrumbs in code igniter?[/quote]
#12

[eluser]ericsodt[/eluser]
I also created a BreadCrumb class that is not dependent on uri segments. Check it out and let me know what you think

http://ellislab.com/forums/viewthread/99982/





[quote author="JulianM" date="1223787390"]I just submitted a simple breadcrumb helper function here: http://ellislab.com/forums/viewthread/93588/

Julian

[quote author="Spaxx" date="1208979404"]Hi.
Is there a library for creating menu breadcrumbs in code igniter?[/quote][/quote]
#13

[eluser]ardinotow[/eluser]
Hi, you may try my breadcrumb helper here:
http://ellislab.com/forums/viewthread/137949/
It's new helper with less configuration
#14

[eluser]razerone[/eluser]
[quote author="HdotNET" date="1209030481"]quick and dirty... php4/5, doesn't even need code igniter. to install just drop into libraries and load it.

Edit: copy from here: breadcrumb.php

Code:
<?php
class Breadcrumb{
    var $bread = '';
    var $crumbs = array();
    var $href_param;
    var $seperator;
    var $home_text;
    var $home_link;
    function Breadcrumb($seperator=" > ",$href_param=NULL,$home_link='/',$home_text = "Home"){
        $this->href_param = $href_param;
        $this->seperator = $seperator;    
        $this->home_text = $home_text;
        $this->home_link = $home_link;
        $this->crumbs[] = array('crumb'=>$this->home_text,'link'=>$this->home_link);
    }
    function addCrumb($this_crumb,$this_link = NULL){
        $in_crumbs = false;
        // first check that we haven't already got this link in the breadcrumb list.
        foreach($this->crumbs as $crumb){
            if($crumb['crumb'] == $this_crumb ){
                $in_crumbs = true;
            }
            if($crumb['link'] == $this_link &&  $this_link != ''){
                $in_crumbs = true;
            }
        }
        if($in_crumbs == false){
            $this->crumbs[] = array('crumb'=>$this_crumb,'link'=>$this_link);
        }
    }
    // call this to return your breadcrumb html
    function makeBread(){
        $sandwich = $this->crumbs;
        $slices = array();
        foreach($sandwich as $slice){
            if (isset($slice['link']) && $slice['link'] != '') {
                $slices[] = '<a href="' . $slice['link'] . '">href_param.'>' . $slice['crumb'] . '</a>';
            } else {
                $slices[] = $slice['crumb'];
            }    
        }
        $this->bread = join($this->seperator, $slices);
        return $this->bread;
    }
}
?&gt;
[/quote]

I tried that saved it in the libraries and uploaded it didn't show any thing am in to put any thing in this part i have added a class to my views file called <div class="breadcrumb">

var $bread = '';
var $crumbs = array();
var $href_param;
var $seperator;
var $home_text;
var $home_link;




Theme © iAndrew 2016 - Forum software by © MyBB