How to create a breadcrumb widget

Comparing #1 with #6

Content

Here's a simple way to create a breadcrumb widget to be used in your templates. The idea is just to isolate how the breadcrumb is generated based on an array of crumbs. >Info: Please note, that new versions of Yii Framework already contain a bulit-in breadcrumbs widget. See [this class reference chapter](http://www.yiiframework.com/doc/api/1.1/CBreadcrumbs "this class reference chapter") for more information. Information in this article may be, however, usable to build custom one, not descending from bulit-in one.
 
 
**components/BreadCrumb.php:**

```php
[...]
public $crumbs = array();
public $delimiter = '
/ / ';

public function run() {
[...]
}
if(next($this->crumbs)) {
echo
" {$this->delimiter} ";
}
}
[...]
array('name' => 'Login'),
),
'delimiter' => '
 → ', // if you want to change it )); ?> ```