jaws-project / jaws

Jaws is a Web Application Framework and Content Management System for building dynamic web sites.
htt://jaws-project.com
39 stars 17 forks source link

Gagdet Menu wrong SetBlock position in MenuLayoutHTML::GetNextLevel #60

Closed ykh closed 11 years ago

ykh commented 11 years ago

if ($selected || !empty($subLevel) || $i == 0 || $i == $len - 1) {
  $tpl->SetBlock('levels/menu_item/class');
   /*
    some stuff...
    */
  $tpl->ParseBlock('levels/menu_item/class');       
}

its add 'menu_item' class name to first item and last item also, but for another items does not.

sample html result: notice to menu_item class name for <li> tags.

<ul>
  <li class="menu_item menu_current menu_first">
    <a target="_self" href="i.html"><span>I</span></a>
  </li>
  <li>
    <a target="_self" href="like.html"><span>Like</span></a>
  </li>
  <li>
    <a target="_self" href="jaws.html"><span>Jaws</span></a>
  </li>
  <li class="menu_item menu_last">
    <a target="_self" href="forever.html"><span>Forever</span></a>
  </li>
</ul>

so, i think this will be better:

$tpl->SetBlock('levels/menu_item/class');
if ($selected || !empty($subLevel) || $i == 0 || $i == $len - 1) {                
  /*
  some stuff...
  */
}
$tpl->ParseBlock('levels/menu_item/class');
mkhahani commented 11 years ago

fixed: d8eb07a74c3515f2654a18ec7ce5f4ec7a55cdcf

Thanks for reporting.