Hi Guys,
I don’t know if anybody has faced such a situation, but I can’t really find relevant info on the net.
I’m using Giix and nestedsetbehavior.
based on this Wiki: Understanding Virtual Attributes and get/set methods
I made a virtual attribute:
public function getNbspName() {
return str_repeat(html_entity_decode(" "), $this->level*4) . $this->name;
}
this way, in the view, it looks as I want.
The problem: I wanted to echo the variable NbspName in the related table’s create form, to kinda have the same tabbed design in the dropdown:
<?php echo $form->dropDownList($model, 'foreign_id',
GxHtml::listDataEx(Model::model()->findAllAttributes(null, true), 'id', 'NbspName')); ?>
why is it not rendered in the dropdown list the same way, with visible nbsps? If I put nbsps manually into a select list, it is rendered, so the problem is somewhere else.
And the order of data is also not correct.
Or should I try a different approach?
Thanks!
c