payu2107 / zii

Automatically exported from code.google.com/p/zii
0 stars 0 forks source link

CMenu: ul tag shouldn't be rendered if no list items are displayed #21

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
when <ul></ul> is rendered without li tags between, it creates invalid 
markup.

maybe this 

    protected function renderMenu($items)
    {
        echo CHtml::openTag('ul',$this->htmlOptions)."\n";
        $this->renderMenuRecursive($items);
        echo CHtml::closeTag('ul');
    } 

shuld be replaced like

    protected function renderMenu($items)
    {
                if(count($items)>0)
                {
                echo CHtml::openTag('ul',$this->htmlOptions)."\n";
                $this->renderMenuRecursive($items);
                echo CHtml::closeTag('ul');
                }
    }

Original issue reported on code.google.com by wapr...@gmail.com on 8 Jan 2010 at 3:48

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r102.

Original comment by qiang.xue on 9 Jan 2010 at 8:38