Drupal 6: Change Menu Link Title Dynamically


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

This goes in your template.php file


Copy this code and paste it in your HTML
  1. <?php
  2. /**
  3.  * Implementation of phptemplate_preprocess_page()
  4.  * Variables available in page.tpl.php can be overriden from this function.
  5.  * They are referenced in the array $vars
  6.  *
  7.  * This example shows changing a title of a link in the primary nav menu
  8.  * I suggest print_r() the $vars array and explore its contents
  9.  * (this snippet belongs in the template.php file and remember to clear your cache
  10.  */
  11. function phptemplate_preprocess_page(&$vars) {
  12. $vars['primary_links']['foobar']['title'] = 'My Member Page';
  13. }
  14. ?>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.