breadcrumbs ain't showing.

i put this :




<?php $this->widget('zii.widgets.CBreadcrumbs', array('links'=>$this->breadcrumbs,));?>




on my main.php… it doesnt show anywhere…

pls help i’m a noob. :(

Have you checked that $this->breadcrumbs has some values?

i echoed it and it shows “Array”… without any links… just text. what’s wrong? breadcrumbs doesn’t have a value? if so how do i put a value in it? ???





<?php


   $this->breadcrumbs=array(

	'Link 1'=>array('index'),

	'Some Text',

   );




    $this->widget('zii.widgets.CBreadcrumbs', array(

		'links'=>$this->breadcrumbs,

	));


?>




If you would check the default code generated by Gii (or yiic) you would see the usage for breadcrumbs…

In components/controller.php is defined $breadcrumbs… as all other controllers extend this one you can use this property in any view that you need to display it like:




$this->breadcrumbs=array(

	'Kontacts'=>array('kontacts'),

	'Create post'=>array('post/create'),

	'Current position',

);



is this valid? coz it shows now but its like this

and "Array" is just text.




$this->breadcrumbs=array(

       	'Sports'=>array(Yii::app()->homeUrl)

        

);


$this->widget('zii.widgets.CBreadcrumbs', array('links'=>$this->breadcrumbs,));

 




the text "Array" suggests you have an echo statement somewhere on the breadcrumbs variable. Locate and remove it.

i got it thanks…

is it normal for the breadcrumbs to go like this?

Home Sport >>

when it’s supposed to look like this

Home >> Sport