Hiding a panel title by overriding it in the layout settings also removes it from the html TITLE element, so the web browser just shows the site name. This is desirable for some panels (eg home page) but in some cases, the hiding of the title is a design matter: the panel still has a title for menus, and the overall drupal page title should still be set.
As far as I can tell, there's no way to do this currently. (Save leaving the title and hiding it with css.)
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | editpaneltitle.jpg | 38.76 KB | jamesmcd |
| #2 | loginregister.png | 74.99 KB | jamesmcd |
Comments
Comment #1
joachim commentedHm on second thoughts both the TITLE and the page title are made with drupal_set_title, so this is probably one to be done in theming...
Comment #2
jamesmcd commentedI need to do the same, I currently have a title I do not want appearing and I have no way of removing it as the form specifies I must enter a title. Does anyone know a way round it? I have attached a screenshot of my login/register page. It is the text I have renamed to "Title" (as an example) which I would like to remove from view.
Any ideas would be much appreciated
Thanks
Comment #3
joachim commented@jamesmcd -- It sounds like what you want is no title at all, either in the HTML HEAD title or the displayed page title. For that, just leave 'Page title:' blank in the Settings tab.
Comment #4
jamesmcd commentedYes that is right.. I want no title at all. I already have a breadcrumb stating the title, and it will look messy repeating login or register when it is written below already on the two panes within the panel. I am unable to leave the 'page title' blank in the settings tab as it is starred red and therefore won't let me leave it blank.
Please see screen shot attached
Thanks
Comment #5
joachim commentedLooks like you have a Panel Node. Nodes ALWAYS have titles. Hide it with node template perhaps?
Comment #6
jamesmcd commentedExcuse my ignorance.. I am fairly new to Drupal! How would I go about hiding it with the node template?
Many thanks
Comment #7
janamills commentedSorry, just going back to your original post joachim, that is exactly what I want to do. On some occasions I want to use a nice graphic for a page title but obviously it's still important to have a title for the page for the browser and whatnot. Did you manage to find a solution to your problem in the end?
Comment #8
joachim commentedI don't think I did.
IIRC we used the theme's page preprocessor to set path-specific classes on the BODY element, and then used CSS rules on that to hide the panels' titles, which I find fairly ugly.
Comment #9
merlinofchaos commentedWhile no one's supporting the D5 version, I will comment that the problem here is that Drupal provides only 1 way to set the title: drupal_set_title(). It sets both the title element and the visible page title.
page.tpl.php renders both of these.
Panels has absolutely no way to interact with this, especially in D5. In D6 it is vaguely possible that a preprocess function could do something, but I am not sure it is worth adding a UI element for something that is unlikely to see much use, and instead to encourage those few who need it to take care of it at their own theme layer.
Comment #10
janamills commentedYes I have this use case only in D6, but I see your point that it's not worth coding if not enough people will be making use of it! Many thanks for all your hard work with this great module!
Comment #11
jdwfly commentedJust in case someone else stumbles upon this like I did there are two variables in your page.tpl.php file:
$head_title - used in the head portion of the html document
and
$title - used in the body portion of the html document
In my case I was setting the title manually for a custom panel page, but I didn't want that title to actually display on the page because it was already displaying via the menu. All I needed to do was a simple if statement in my theme_preprocess_page function to unset the $title variable.
Comment #12
Todd Young commentedAnd http://drupal.org/project/simple_page_title is supposed to support this ability, but I haven't been able to *find* it once installed in D7 yet...
Comment #13
Todd Young commentedBTW, in order to effect the same result I simply started hiding the content-area page title in Panels pages with jQuery:
jQuery('#page-title').hide();