link1.add(new AttributeModifier("class", true, new AbstractReadOnlyModel<String>() { public String getObject() { return AbstractBasePage.this.getClass().equals(LinkOnePageClass.class) ? "selectedPage" : "notSelectedPage"; } });
There's probably a way to make that more reusable - but that should get you started. -- Jeremy Thomerson http://www.wickettraining.com On Mon, May 17, 2010 at 4:24 PM, Ioannis Mavroukakis < imavrouka...@gameaccount.com> wrote: > Hey guys got a newbish question I cannot get my head around, and I would > appreciate any help. > > I've got an AbstractBasePage template using markup inheritance. It very > simply has some BookmarkablePageLink's which are common > across all pages. What I want to do, is have a different css class for the > active link (i.e. the one whose page you are on) and another for the > inactive ones > and I cannot for the life of me figure out what's the best way to do it. > Is it something I should be doing in code ? > > TIA! > > Yiannis.