danjapro
12-19-2006, 10:02 AM
I am generating my menu dynamically as a dhtml menu.
however the third level 'MenuSubCat'. I cannot get it to display properly and to loop all the third level sub menus to correct second leve menu.
[Code]
<ul id='<% =ctr+1 %>menu' class="DhtmlMenuItem">
<%
show = TRUE
ctr = ctr + 1
end if
%>
<% if LastMenuCat <> MenuCat OR LastMenuSubCat <> MenuSubCat or Show then %>
<li class="dhtml"> <A href='content.do?CatId=<% =MenuCatId %>'> <% =MenuCat%> </li>
</A>
<ul id='<% =ctr+2 %>menu' class="DhtmlMenuItemSub">
<li class="DhtmlMenuItemSub"> <A href='content.do?subCatId=<% =MenuSubCatId %>'> <% =MenuSubCat%> </A></li></li>
<%
show = FALSE
end if
recs = recs+1
LastMenuCat = MenuCat
LastMenuSubCat = MenuSubCat
LastMenuContentType = MenuContentType
if recs=num_recs then response.write "</ul></ul></li>"
%>
<%
rs.MoveNext
rec_count = rec_count + 1
loop
rs.Close
%>
however the third level 'MenuSubCat'. I cannot get it to display properly and to loop all the third level sub menus to correct second leve menu.
[Code]
<ul id='<% =ctr+1 %>menu' class="DhtmlMenuItem">
<%
show = TRUE
ctr = ctr + 1
end if
%>
<% if LastMenuCat <> MenuCat OR LastMenuSubCat <> MenuSubCat or Show then %>
<li class="dhtml"> <A href='content.do?CatId=<% =MenuCatId %>'> <% =MenuCat%> </li>
</A>
<ul id='<% =ctr+2 %>menu' class="DhtmlMenuItemSub">
<li class="DhtmlMenuItemSub"> <A href='content.do?subCatId=<% =MenuSubCatId %>'> <% =MenuSubCat%> </A></li></li>
<%
show = FALSE
end if
recs = recs+1
LastMenuCat = MenuCat
LastMenuSubCat = MenuSubCat
LastMenuContentType = MenuContentType
if recs=num_recs then response.write "</ul></ul></li>"
%>
<%
rs.MoveNext
rec_count = rec_count + 1
loop
rs.Close
%>