You can avoid code duplication in case you don't really need h1 tag, but it is enough just to look like h1 tag ... you can add css like: h1, .myH1 { font-size:24px; } and change markup to be <div wicket:id="homeLinkContainer"> <a wicket:id="homeLink" title="Home" href="#">ABC, Inc.</a> </div> you will set your custom class on homeLinkContainer is current page is home page
On Sat, Nov 23, 2013 at 1:27 AM, Sebastien <seb...@gmail.com> wrote: > Maybe just using setEnabled(false) in the HomaPage? > > > On Fri, Nov 22, 2013 at 7:24 PM, Scott Carpenter <scarpen...@gmail.com > >wrote: > > > Suppose you have a web site with a logo in the header which links to the > > home page. On the home page itself, you have the same logo and the link, > > but you also want to wrap the logo with an H1 tag. > > > > (Or maybe it's not that you have a burning desire to do this, but your > > client has requested it.) > > > > In my Wicket inexperiencedness, I might try this: > > > > <wicket:enclosure child="homePageHomeLink"> > > <h1><a wicket:id="homePageHomeLink" title="Home" href="#">ABC, > > Inc.</a></h1> > > </wicket:enclosure> > > <wicket:enclosure child="homeLink"> > > <a wicket:id="homeLink" title="Home" href="#">ABC, Inc.</a> > > </wicket:enclosure> > > > > And then on the Java side, set one or the other to be invisible. > > > > That works, but I'd like to know if there's a better way. > > > > Thank you! > > > -- WBR Maxim aka solomax