Quick Nav:  Online Store   |   Login | Register

The Leveln-Container tag

Rate this topic:

Please Register to post a reply. Another benefit of registration is the ability to subscribe to and recieve notifications of new posts.
AuthorMessages
Vasilis Terzopoulos
<20 Posts
Posts:2


09/27/2007 7:54 PM  

Hi John,

I was looking at this really great menu implementation you have done in the SilverTabHover skin and I found that the Child.template doesn't work as it should. Well it works fine for two levels (root + 1) but not for more. I think the problem is with the Leveln-Container tag which wraps every single item and not the whole group of items in the level.

So if you check your SilverTabHover skin adding some pages in the second and third level, you'll end up with something like the following (the root is not included):


< div class="TabList" id="navChild">
    < ul class="Level1">
        < li>< a>Item< /a>< /li>
    < /ul>
    < ul class="Level1">
        < li>< a>Item< /a>
            < ul class="Level2">
                < li>< a>Item< /a>< /li>
            < /ul>
            < ul class="Level2">
                < li id="navChild-57">< a>Item< /a>< /li>
            < /ul>
            < ul class="Level2">
                < li id="navChild-59">< a>Item< /a>< /li>
            < /ul>
        < /li>
    < /ul>
< /div>


where someone would expect:


< div class="TabList" id="navChild">
    < ul class="Level1">
        < li>< a>Item< /a>< /li>
        < li>< a>Item< /a>
            < ul class="Level2">
                < li>< a>Item< /a>< /li>
                < li id="navChild-57">< a>Item< /a>< /li>
                < li id="navChild-59">< a>Item< /a>< /li>
            < /ul>
        < /li>
    < /ul>
< /div>


The point is that I found a way to get this result not including in the template the Leveln-Container tag. Below is the updated template (for the first two levels):


[${IEHoverJS}[ onmouseover="this.className+=' hover ';" onmouseout="this.className=this.className.replace(' hover ', '');" ]$]

[NavMenu-Container[ < div id="navChild" class="TabList">< ul id="navChild-{Tab.ParentId}-{Tab.Id}" class="Level1"> ]]
    [Level1-Item[ < li id="{NavMenu.Id}-{Tab.Id}" IIF({Browser}='IE',{IEHoverJS})> ]]
        [Level1-Anchor[ < a href="{Tab.Url}" title="{Tab.Title}" IIF({Tab.IsActive}='True',class="SelectedItem")>{Tab.Name}< /a>< ul class="Level2"> ]]
            [Level2-Item[ < li id="{NavMenu.Id}-{Tab.Id}" IIF({Browser}='IE',{IEHoverJS})> ]]
                [Level2-Anchor[ < a href="{Tab.Url}" title="{Tab.Title}" IIF({Tab.IsActive}='True',class="SelectedItem")>{Tab.Name}< /a> ]]
            [/Level2-Item[ < /li> ]]
    [/Level1-Item[ < /ul>< /li> ]]
[/NavMenu-Container[ < /ul>< /div> ]]


The only problem with the above is that when a Level1-Item has no children, you get an empty ul tag.

That's it for now. I thought you should know.

Anyway I'm just a few hours on this hot stuff and I'm already excited. A big thanks for all the hard work you have put into this.

Cheers,
Vasilis


ThinkofDesign - DotNetNuke Skins and Resources
Vasilis Terzopoulos
<20 Posts
Posts:2


09/27/2007 7:58 PM  

Always tough to post code...

Please find attached a txt with the code


Attachment: 192701883071.txt


ThinkofDesign - DotNetNuke Skins and Resources
John Mitchell
Posts:3478


09/28/2007 2:05 PM  
Thanks for alerting me to this Vasilis, and especially for the detailed analysis.
I thought I had all these types of bugs squashed, but it looks like I need to take a deeper look.
Please Register to post a reply. Another benefit of registration is the ability to subscribe to and recieve notifications of new posts.
Forums >Snapsis Product Support >CSS NavMenu > The Leveln-Container tag



ActiveForums 3.7
Powered by: Snapsis Software