I am having a lot of trouble getting breadcrumbs to render correctly. For example, in a view I am setting it up like this:
$this->breadcrumbs=array(
'Patients'=>array('patient/admin'),
$model->patient_id=>array('patient/view','id'=>$model->patient_id),
'Enrollment'=>array('view','id'=>$model->id),
$model->id=>array('view','id'=>$model->id),
'Lesion Grid',
);
I’d expect to see
Home » Patients » 1 » Enrollment » 1 » Lesion Grid
with the correct links - what I do see though is this
Home » Patients » 1 » Enrollment » Lesion Grid
and the links are incorrect. the “1” links to the enrollment view id (1) and the patient value doesn’t show up at all. This seems to happen when the patient id and the enrollment id are equal. If the patient id and the enrollment id are not equal, then it renders correctly.
Home » Patients » 1 » Enrollment » 11 » Lesion Grid
with the correct linking. I’m seeing similar strange breadcrumb issues throughout my project. Any ideas?