help

moti234bent - October 22, 2009 - 12:05

Hi,

Could anyone suggest how I can add the rel="nofollow" to this php?

function node_link($type, $node = NULL, $teaser = FALSE) {
$links = array();

if ($type == 'node') {
if ($teaser == 1 && $node->teaser && $node->readmore) {
$links[ 'node_read_more'] = array(
'title' => t('Read more'),
'href' => "node/$node->nid",
'attributes' => array('title' => t('Read the rest of this posting.'))
);
}
}

}

Add it in attributes

doublethink - October 22, 2009 - 12:08

<?php
function node_link($type, $node = NULL, $teaser = FALSE) {
 
$links = array();

  if (
$type == 'node') {
    if (
$teaser == 1 && $node->teaser && $node->readmore) {
     
$links[ 'node_read_more'] = array(
       
'title' => t('Read more'),
       
'href' => "node/$node->nid",
       
'attributes' => array(
         
'title' => t('Read the rest of this posting.'),
         
'rel' => 'nofollow'
       
)
      );
    }
  }
}
?>

thank you very very much

moti234bent - October 22, 2009 - 21:05

thank you very very much

 
 

Drupal is a registered trademark of Dries Buytaert.