Can't dynamically add tabs when tabs rendered with empty tabs array

Issue #192 wontfix
Anonymous created an issue

Trying to render tabs widget with empty tabs array. As <ul> element is implemented using menu widget, it doesn't renders it. In TbBaseMenu in function renderMenu there is the following line:

$n = count($items);

if($n > 0)

As items is null it doesn't render <ul> tag. Therefore I can't dynamically add tabs using JavaScript. Is there any practicall use not to render empty <ul> tag? Maybe this condition should be removed? Another way out is to add property - renderEmptyUl or forceRender.

Comments (1)

  1. Christoffer Niska repo owner

    I don't think so. CMenu also checks if there is menu items before rendering anything and I would like to keep such properties out of the extension unless there is really good reason for adding them.

  2. Log in to comment