Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By bhatmahesht on
I want to hide page title on a specific path, but I want to retain the page title between "title" tags in the header. I want the title to be exist in title bar of the browser, but that should not be displayed in the page for specifici paths.
Is that could be done using theme_preprocess_page ? Or any other specific hooks out there ? or any module.
Comments
What is the source of the
What is the source of the page, is it content or something else?
It is a content, based on menu callback
It's a page created by menu callback. It's not a node
--
Passionate about Drupal
If its a page you are
If its a page you are creating, you should be able to set the title to an empty string. Otherwise there are some module such as Simple Page Title which may work (can't tell if it supports the empty title case). If you are using the context module there is Context No Title
I found another solution
Hi nevets, Thanks for the modules
However I found another solution. I used the theme_process_page and unset the $variables['title'] , and it gave me the exact result what I wanted. There was title in the browser toolbar, but title was hiding from the page.
--
Passionate about Drupal