I am having an issue building a menu with the hierarchal viewer.
I am trying to build a basic unordered list menu with nested unordered lists.
<ul>
<li>test
<ul>
<li>Sub 1
<ul>
<li>Sub 2</li>
</ul>
</li>
</ul>
</li>
<li>test 2
<ul>
<li>Sub 1
<ul>
<li>Sub 2</li>
</ul>
</li>
</ul>
</li>
<li>test 3</li>
</ul>
How would I do this basic structure with the Hierarchal viewer. The problem I am running into is that I cannot get the nested ul in side the parent li and have them all close properly.
I have tried this Header transformation
<ul>
Footer transformation
</li></ul>
Item transformation
<%# IfCompare(Eval("NodeOrder"),1,"</li>","") %>
<li>some cde here to get links and what not
I have the if compare to check and see if it is the first item in it's section so that I do not get extra closing tags.
This would work fine, but the noderorder get's messed up and 1 is not always the value for the first item. In fact it seems to constantly get messed up whenever a new item is added.
I have also tried using the first item transformation without the closing tags to start and then having the rest use the closing with out the compare but it doesn't seem to get the first item in each level properly.