Hi
How can I completely hide node titles for a specific node type? I don't want the title to show up anywhere when I let my browser show the source code. Especially I don't want to show up the title in meta content tags or the .
I tried to use template.php for it, but it did not help.

I tried these code:
function ee_basic_preprocess_node(&$vars) {
if ($vars['type'] == 'kontakt'){
$vars['title'] = "test";
}
}

and tried also in preprocess_page and preprocessed_html. It did not work.

So, does anybody know an answer?
Thanks a lot

Comments

donpwinston’s picture

If you make a node template override, i.e., node-.tpl.php

You can comment out the print $title; line(s) in the node's template.

(It may not look exactly like the above because of the theme you are using, but there should be something equivalent)

Simpler is always better.

majorbenks’s picture

Yes, I did that already. The title does not show up as title. But if you look what your browser gets, you can see that the title is used at many places.
For Example: The title is "my test page". I don't want to show up this sentence anywhere. But this sentence shows up in the meta tag! And it also shows up in <html><title></title></html> so the browser shows that sentence as tab title oder window title.

Isn't it possible to hide that complete or at least override that sentence with anything else?

kostask’s picture

If you want to override or have control over page titles there is a module for that: Page Title.

If you want to just hide the title, override the page.tpl.php and modify the line: <title><?php print $head_title; ?></title>