How to remove default title set by drupal

You can implement a module and call below function

function modulename_preprocess_page(&$variables) {
unset($variables[‘title’]);
}

This will unset default title, but there are 2 problems:
1. This hook is not called by all the themes. So you cannot entirely rely on this.
2. Some themes check if ‘title’ exits before showing breadcrumb. So if you unset title then your breadcrumb will also disappear.

So finally I came up with this hack.

drupal_set_title( ‘ ‘ );

Note that there is space  between single quotes. This removes default title

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.