Re: Navbar and CSS Problem
Christian Weerts <[email protected]> Sun, 31 Dec 2006 13:00:21 +0100
| Newsgroups | gmane.comp.web.wml |
|---|---|
| Message-ID | <[email protected]> |
Jan Holler wrote: > On Tue, 26 Dec 2006 22:11:00 +0100 Christian Weerts > <[email protected]> wrote: > > > When WML creates the navbar's <a ..> tags, the tags on the selected > > Menuitem are vanished. But with CSS I've made a class that applies > > attributes to the selected menuitem which is needed by my layout. > > Could you give an example please? Yes, of course. Here it is: # define the navigation bar in main.style <navbar:define name=navbar> # navbar header <navbar:header><div id="menu"></navbar:header> <navbar:prolog></navbar:prolog> # the navbar-items <navbar:button id=welcome url=index.html txt=Willkommen> <navbar:button id=aqua url=Aquaristik/ txt=Aquaristik> <navbar:button id=linux url=Linux/ txt=GNU/Linux> <navbar:button id=web url=WebDesign/ txt=WebDesign> <navbar:button id=bahn url=Modellbahn/ txt=Modellbahn> <navbar:button id=kontakt url=kontakt.html txt=Kontakt> <navbar:button id=impressum url=impressum.html txt=Impressum> # navbar footer <navbar:epilog></navbar:epilog> <navbar:footer></div></navbar:footer> </navbar:define> <navbar:render name=navbar :a.N:class="" :a.S:class="active" :a.SS:class="active" select=impressum> The important thing here is that impressum is selected. This will produce the following HTML-code (only the needed things pasted): <a href="kontakt.html" onmouseover="self.status = 'kontakt.html'; return true" onmouseout="self.status = ''; return true" onfocus="self.status = 'kontakt.html'; return true" onblur= "self.status = ''; return true" class="">Kontakt</a> Impressum</div> As you can see, Impressum is shown as selected in the navbar. I want now the possibility to add a submenu to Impressum and make it display under the parent menu item. Something that looks like this: 1. Foo 1.1 foobar 1.2 foobaz 2. Bar 2.1 barfoo 2.2 barbaz and so on. My wish is to implement this by using the CSS possibilitys. Therefore I need wml-generated output like this: <a href="foo.html" id="CSS-Style">Foo</a> <a href="foobar.html" id="CSS-Style-2">foobar</a> and so on. Thanks for your help. Regards, Christian _____________________________________________________________________ Website META Language (WML) http://thewml.org User Support Mailing List [email protected] Automated List Manager [email protected]