Adding span to primary links in Drupal 6


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <?php
  2. function YOURTHEME_preprocess_page(&$vars) {
  3.  
  4. $links = $vars['primary_links'];
  5.  
  6. foreach ($links as $key => $link) {
  7. $links[$key]['html'] = true;
  8. $links[$key]['title'] = '<span>'. $link['title'] . '</span>';
  9. }
  10.  
  11. $vars['primary_links'] = $links;
  12. }
  13. ?>

URL: http://drupal.org/node/221382#comment-2271738

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.