By SimonVlc on
Hi there,
I know that it´s possible, overriding theme_links function, but I don´t know where to add the rel=nofollow code in the function code:
http://api.drupal.org/api/function/theme_links/6
Anyone could help me please? Thanks in advance, Simon.
Comments
Anyone?
Anyone?
Add it to the $attributes argument
Originally I thought that the $attribute argument should do it for you.
$attributes = array('class' => 'links', 'rel'='nofollow')
but that will just style the UL tag
after skimming the code it would seem that you can supply attributes to the $links array.
such as
since each links gets passed through l()
you should be able to use it just like any other call to the l() function.
According to the docs the second argument will apply the attributes to the themed linkes. rel=nofollow is an attribute and should be applied.
Note: this is not tested, just off my head.
If the $links variable is generated somewhere else, you would have to cycle through the links and find the 'attribute' key, if it has one, and then manually add the attribute.
Thanks a lot kaiserjozy ;)!
Thanks a lot kaiserjozy ;)! That was!!!
Or, $link = array( 'href'
Or,