I am trying to develop a custom theme for my vb5.0 site. I would like to apply a custom button background to subtab menu items by class. I noticed that there seems to be some error or issue with the way the default code is written. So the class is not being generated. It merely produced this class="". Here is the code in question in the header template...
<div id="channel-subtabbar" class="clearfix {vb:if empty($subnavItems), hide}">
<ul class="left">
<vb:each from="subnavItems" value="navbarItem">
{vb:set navbarTitle, {vb:raw navbarItem.title}}
{vb:set normalizedUrl, {vb:raw navbarItem.normalizedUrl}}
<vb:if condition="$targetAttr = $navbarItem['newWindow'] == '1' ? ' target=\'_blank\'' : ''"></vb:if>
<vb:if condition="$itemUrl = $navbarItem['isAbsoluteUrl'] ? $normalizedUrl : ($baseurl . '/' . $normalizedUrl)"></vb:if>
<vb:if condition="$atCurrentItem = !empty($navbarItem['current'])"></vb:if>
<vb:if condition="$currentClass = $atCurrentItem ? 'current' : ''"></vb:if>
<li class="{vb:raw currentClass}"><a{vb:raw targetAttr} href="{vb:raw itemUrl}">{vbhrase {vb:raw navbarTitle}}</a></li>
</vb:each>
</ul>
</div>
So how do we edit this to make sure it is displaying the correct class name instead of a blank?
<div id="channel-subtabbar" class="clearfix {vb:if empty($subnavItems), hide}">
<ul class="left">
<vb:each from="subnavItems" value="navbarItem">
{vb:set navbarTitle, {vb:raw navbarItem.title}}
{vb:set normalizedUrl, {vb:raw navbarItem.normalizedUrl}}
<vb:if condition="$targetAttr = $navbarItem['newWindow'] == '1' ? ' target=\'_blank\'' : ''"></vb:if>
<vb:if condition="$itemUrl = $navbarItem['isAbsoluteUrl'] ? $normalizedUrl : ($baseurl . '/' . $normalizedUrl)"></vb:if>
<vb:if condition="$atCurrentItem = !empty($navbarItem['current'])"></vb:if>
<vb:if condition="$currentClass = $atCurrentItem ? 'current' : ''"></vb:if>
<li class="{vb:raw currentClass}"><a{vb:raw targetAttr} href="{vb:raw itemUrl}">{vbhrase {vb:raw navbarTitle}}</a></li>
</vb:each>
</ul>
</div>
So how do we edit this to make sure it is displaying the correct class name instead of a blank?
Comment