Webmastersite.net
Register Log In

no_follow links only for ONE category
Is this possible?

Comments on no_follow links only for ONE category


Beginner

Usergroup: Guest
Joined:

Total Topics: 0
Total Comments: 0
Posted Feb 18, 2008 - 12:27 AM:

Hi

Is it possible to customise links to only affect one (or more...) specific categories?

I have one category where I want to ensure that outgoing links are tagged with the rel="nofollow" attribute. Is there a way to do this?

Thanks.
babrees
Expert

Usergroup: Customer
Joined: Aug 19, 2005
Location: England

Total Topics: 391
Total Comments: 1303
babrees
Posted Feb 18, 2008 - 12:47 AM:

I am not sure if conditionals would work in the External links appendage, but you could use an if statement in your template...

<IF {CATID} is ##><a href="{TRACKLINKURL}" {EXTERNALLINKS} rel="nofollow">{LINKTITLE}</a><OTHERWISE><a href="{TRACKLINKURL}" {EXTERNALLINKS} >{LINKTITLE}</a></IF>

Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Feb 20, 2008 - 5:12 AM:

The external links appendage involves things that aren't items in categories, so don't test for a category there, just edit the link bit template (Admin -> Templates -> Manage Templates -> Subtemplates).

Beginner

Usergroup: Guest
Joined:

Total Topics: 0
Total Comments: 0
Posted Feb 23, 2008 - 2:41 AM:

So just to get this right...

In linkbit.tpl, I add the following (making sure that I add the proper category ID number)?

<IF {CATID} is ##><a href="{TRACKLINKURL}" {EXTERNALLINKS} rel="nofollow">{LINKTITLE}</a><OTHERWISE><a href="{TRACKLINKURL}" {EXTERNALLINKS} >{LINKTITLE}</a></IF>

A couple of questions.

Where exactly will I add this line?

Will this work with rewritten URLs?

Thanks.
babrees
Expert

Usergroup: Customer
Joined: Aug 19, 2005
Location: England

Total Topics: 391
Total Comments: 1303
babrees
1 of 1 people found this comment helpful
Posted Feb 23, 2008 - 3:19 AM:

dt wrote:
So just to get this right...

In linkbit.tpl, I add the following (making sure that I add the proper category ID number)?

<IF {CATID} is ##><a href="{TRACKLINKURL}" {EXTERNALLINKS} rel="nofollow">{LINKTITLE}</a><OTHERWISE><a href="{TRACKLINKURL}" {EXTERNALLINKS} >{LINKTITLE}</a></IF>

A couple of questions.

Where exactly will I add this line?

Will this work with rewritten URLs?

Thanks.


Yes, that is correct.

Replace
<a href="{TRACKLINKURL}" {EXTERNALLINKS}>{LINKTITLE}</a>


Beginner

Usergroup: Guest
Joined:

Total Topics: 0
Total Comments: 0
Posted Feb 23, 2008 - 3:42 AM:

Thanks. Much appreciated.
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Feb 23, 2008 - 6:16 AM:

Rewriting makes no difference.
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



Sorry, you don't have permission to post posts. Log in, or register if you haven't yet.