Hi,
I can’t create the breadcrumb in one view, how I would!
That’s what I’d like to have:
That’s the output:
And here is the view.php
<?php
$this->breadcrumbs=array(
'Galleries'=>array('index'),
$location.name=>array('location/view', 'id'=>$model->location_id),
$model->title,
);
$this->menu=array(
array('label'=>'List Gallery', 'url'=>array('index')),^M
array('label'=>'Create Gallery', 'url'=>array('create')),^M
array('label'=>'Update Gallery', 'url'=>array('update', 'id'=>$model->id)),^M
array('label'=>'Delete Gallery', 'url'=>'#', 'linkOptions'=>array('submit'=>array('delete','id'=>$model->id),'confirm'=>'Are you sure you want to delete this item?')),^M
array('label'=>'Manage Gallery', 'url'=>array('admin')),^M
);^M
?>^M
^M
<h1><?php echo $model->title; ?></h1>^M
^M
<?php
/*
$this->widget('zii.widgets.CDetailView', array(^M
'data'=>$model,^M
'attributes'=>array(^M
'location.name',
'description',
'date',
'rating',
),^M
));
*/
?>
<div class="view">
<h1><?php echo $model->title; ?></h1>
<?php echo $location->name; ?><br />
<?php echo $model->description; ?><br />
<?php echo $model->date; ?> <img src="images/rating_<?php echo $model->rating; ?>.png" /></div>
<?php foreach($model->pictures as $picture): ?><div class="thumbbox"><div class="thumbnail"><?php echo CHtml::link('<img src="gallery/'.$picture->gallery.'/th_'.$picture->picturenumber.'.jpg" alt="'.$picture-
>picturenumber.'.jpg" />', array('pictures/view', 'id'=>$picture->id)); ?></div></div>
<?php endforeach; ?>
I’ve tried to assign the content from this to a variable like
$foo = $model->location.name;
in all possibilities
But nothing works
I see the data from the table in <div class="view"> and CDetailView!