Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-07-21 18:44:12

smallt
Member
Registered: 2004-12-21
Posts: 26

Howto add rel="nofollow" to the <txp:link /> tag

Is anyone aware of a way to add “rel=nofollow” to the <txp:link /> tag? The links page on my site (http://www.smallTransport.com/links/) gets quite a bit of traffic and I would like to ensure the rel=“nofollow” tag is added to the links. Am I missing something?

<small>(Edited to display tag. -Els)</small>

Last edited by els (2006-07-21 19:47:40)

Offline

#2 2006-07-21 19:46:30

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Howto add rel="nofollow" to the <txp:link /> tag

According to TextBook:

<pre>Tag will accept the following attributes (note: attributes are case sensitive):
rel=“relation” Value for the HTML rel attribute. Default is empty. [4.0.4]</pre>

[4.0.4] means: not yet, but soon :)

Offline

#3 2006-07-21 19:51:38

smallt
Member
Registered: 2004-12-21
Posts: 26

Re: Howto add rel="nofollow" to the <txp:link /> tag

Are you meaning to say I can add rel=“nofollow” to the textpattern <txp:link /> tag?

Offline

#4 2006-07-21 19:57:03

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Howto add rel="nofollow" to the <txp:link /> tag

Not yet, but it will be in the next version (4.0.4).

Offline

#5 2006-07-21 19:57:54

smallt
Member
Registered: 2004-12-21
Posts: 26

Re: Howto add rel="nofollow" to the <txp:link /> tag

I noticed that in textBook it said the tag accepted re=“relation” but it does not work for me. hmmm. The following code breaks textpattern’s rendering of the links:

<txp:link rel=“nofollow” />

Offline

#6 2006-07-21 19:59:38

smallt
Member
Registered: 2004-12-21
Posts: 26

Re: Howto add rel="nofollow" to the <txp:link /> tag

duh, I overlooked that minor detail. Thanks. I wonder if there is a way in the interim for me to modify the textpattern php to always incorporate rel=“nofollow”?

Offline

#7 2006-07-21 20:00:14

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Howto add rel="nofollow" to the <txp:link /> tag

You can’t do it yet :) See here.

Offline

#8 2006-07-21 20:15:14

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Howto add rel="nofollow" to the <txp:link /> tag

smallt wrote:

duh, I overlooked that minor detail. Thanks. I wonder if there is a way in the interim for me to modify the textpattern php to always incorporate rel=“nofollow”?

Sure, if I’m not mistaken it’s in taghandlers.php, function linklist.

Offline

#9 2006-07-22 16:12:44

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Howto add rel="nofollow" to the <txp:link /> tag

Need an example?

Offline

#10 2006-07-22 16:19:18

smallt
Member
Registered: 2004-12-21
Posts: 26

Re: Howto add rel="nofollow" to the <txp:link /> tag

Sorry I didn’t get back to the forum yesterday. The php file you pointed me to worked beautifully. Thank you so very much for your help!

Offline

#11 2006-07-22 16:33:23

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Howto add rel="nofollow" to the <txp:link /> tag

Please note that the taghandlers.php I pointed to is in the development branche, there may be other changes in this file’s code that won’t work well with 4.0.3!

Offline

#12 2006-07-22 16:43:19

Ace of Dubs
Member
Registered: 2006-04-17
Posts: 446

Re: Howto add rel="nofollow" to the <txp:link /> tag

You can do this right now with zem’s rockin PR-Block Plugin

I use it to assign classes and establish rel attributes… works beautifully :)

Offline

Board footer

Powered by FluxBB