You can retrieve the risks, issues, bugs, … etc that belong to the current project.
So, the menu for the current project can be constructed like …
$items = array();
foreach($risks as $risk){
$items[] = array(
'label'=>'risk:' . $risk->name,
'url'=>array('risk/view', 'id'=>$risk->id)
);
}
foreach($issues as $issue){
$items[] = array(
'label'=>'issue:' . $issue->name,
'url'=>array('issue/view', 'id'=>$issue->id)
);
}
....
$this->widget('zii.widgets.CMenu', array(
'items'=>$items,
));
Or, if you would like a nested menu …
$items = array(
'risk' = array(
'label' => 'Risks',
),
'issue' = array(
'label' => 'Issues',
),
....
);
foreach($risks as $risk){
$items['risk']['items'][] = array(
'label'=>$risk->name,
'url'=>array('risk/view', 'id'=>$risk->id)
);
}
foreach($issues as $issue){
$items['issue']['items'][] = array(
'label'=>$issue->name,
'url'=>array('issue/view', 'id'=>$issue->id)
);
}
....
$this->widget('zii.widgets.CMenu', array(
'items'=>$items,
));
I’m not sure what you want for your menu to look like, but something like those will do the job.
And, this is just a personal opinion, but … if I were you, I would not use a menu widget for the links, because I can not tell how many links I have to handle with the target project. I’d rather use some CGridViews (or CListViews) for the risks, issues, … etc that will show the short descriptions and the links to the detailed informations.