About $variables, $hook,...
By: Arshad
25 Mar 2010From my handbook page on d.o
This little code snippet will add the present page title to the breadcrumb. We show you how to use this in steps.
Step 1 : If you do not have a template.php file in your sites/all/themes/yourtheme/ folder, create one.
Step 2 : Copy and paste this code in the template.php file.
function phptemplate_breadcrumb($breadcrumb){
if (!empty($breadcrumb)) {
$breadcrumb[] = drupal_get_title();
return '<div class="breadcrumb">'. implode(' ยป ', $breadcrumb) .'</div>';
}
}Remember to clear the cache or theme registry to let drupal know of this new theme function.
Hello I'm Arshad. I'm a 21 years old Drupal Web Developer. This is a site i put up for some reasons i can't remember and this is where i write stuffs i need to remember.;)
In the Web world, i head the Drupal Mauritius User Group and the jQuery user Group Mauritius and i'm a campus representative for Mozilla Firefox.
No Responses yet to Adding the page title to the breadcrumb
Post new comment