Re: how to add rel="nofollow" to all links
rel="nofollow" will tell to not weight it but google will still go it - a way to stop this is by doing a robots.txt e.g.: User-agent: * disallow: /*?wicket for wicket 1.4 does the trick, in your case User-agent: * disallow: *ILinkListener* might work - can test this with the google webmaster tools on the specific links that harms you Am Dienstag, 30. Oktober 2012 11:56:54 UTC+1 schrieb danisevsky: > > Hi, > > when I look on my site (Brix and Wicket 6 application) in the google > webmasters tools I see 300 thousands of wrong urls. All of them are > from links (contains ILinkListener). So I would like to ask you if it > would make sense to add attribute rel="nofollow" to all wicket links? > If so is there some way how to do it automatically? > > Thanks in advance! > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: how to add rel="nofollow" to all links
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 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
Re: how to add rel="nofollow" to all links
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
how to add rel="nofollow" to all links
Hi, when I look on my site (Brix and Wicket 6 application) in the google webmasters tools I see 300 thousands of wrong urls. All of them are from links (contains ILinkListener). So I would like to ask you if it would make sense to add attribute rel="nofollow" to all wicket links? If so is there some way how to do it automatically? Thanks in advance! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org