Hi, Using IComponentInstantiationListener is one way. Using a custom IMarkupFilter is another. And I think it is better because it is lighter - it wont add an additional behavior to each Link instance.
On Tue, Oct 30, 2012 at 1:51 PM, Decebal Suiu <decebal.s...@asf.ro> wrote: > Hi > > In your Application.init() add this line: > getComponentInstantiationListeners().add(new LinkListener()); > > public class LinkListener implements IComponentInstantiationListener { > > @Override > public void onInstantiation(Component component) { > if (component instanceof Link) { > component.add(AttributeModifier.append("rel", > "nofollow")); > } > } > > } > > Best regards, > Decebal > > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/how-to-add-rel-nofollow-to-all-links-tp4653459p4653460.html > Sent from the Users forum mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org