How to hide name from node Drupal page

I am trying to remove the page header of a node in Drupal. I have this page:

enter image description here

And I want it to look like this:

enter image description here

As you can see, I want the name to be deleted, but only for taxonomy terms. If I try to erase it using CSS, I will remove all the page headers, so I wanted to use this module , which allows administrators to auto-generate the node header and hide it.

I go to the structure -> content type -> my content type and edit it. I activate the module and I want to auto-generate headers based on the node category. I think it should look like this, but it will not work ...

enter image description here

Any ideas why?

EDIT: Sorry, I forgot to say: yes, when I activate the module, use it and select the category as the auto-generated header, it works. But he does not hide the name ...

It also runs this error:

enter image description here

+4
source share
9 answers

Sorry guys, it was as easy as hiding the tag title on "manage presentation" ...

You are all right, but they were not quite what I needed ... thanks!

+2
source

Use Exclude Node Title Module.

https://drupal.org/project/exclude_node_title

Settings for this module:

enter image description here

Click on Module->Exclude node title->configure Home » Administration » Configuration » Content authoring Select All nodes from Basic Page Check Full Content for hide title from all cms page except home page Check Teaser for hide title from home page. 
+6
source

If you want to remove the title, you should look at redefining the page and node templates.

page.tpl.php and node.tpl.php

All you have to do is click on "View Source" on both of them and copy them to the theme folder. From there, you can change both as needed.

From what I can assemble, you will want to remove the $title print from node.tpl.php.

+2
source

You have a similar problem before, as far as I remember, I just added an if to the code:

 <?php if (blah-blah-blah): ?> <h2> <?php echo $title; ?> </h2> <?php endif; ?> 

Hope this gives you a clue.

Some other thoughts: you can make an if statement or rewrite it not only in page.tpl.php , but also create a specific page-node-type.tpl.php and overwrite only its $title , or you can try adjusting the page output via presentation / panel modules.

Also, could you clarify which title you want to remove? Page title or node title? And it should be deleted only when you look at the nodes associated with some taxonomy term (in other words, when you are on the /taxonomy/term/n page), am I right?

+1
source

Using the Context module, you can add classes to the body so that you can only target taxonomy pages in CSS.

Using the context module to set body classes

+1
source
+1
source

another nice solution for specific nodes is to use the standard $ title_prefix / suffix vars, which should be implemented for each topic. using the standard class element is invisible in the page preprocess.

as:

 /** * Implements hook_preprocess_page(). */ function YOUR_THEME_preprocess_page(&$variables) { if (isset($variables['node']) && $variables['node']->nid == 1) { $variables['title_prefix'] = array('#markup' => '<div class="element-invisible">'); $variables['title_suffix'] = array('#markup' => '</div>'); } } 
0
source

Each page should contain a title.

You should always maintain a structured hierarchy of headings on any web page. You should never have an empty title or even hide it with the display: none ;. Hiding any content that is not viewed by your visitors, but with the help of search engines, is contrary to Google’s recommendations, since you only intend to manipulate search engine results by including them. Restyle a H1 to fit your design is the best option.

If you still need to hide it, the best option would be to create a template for this node, type or content page and just not print the header.

Or, if you want to use CSS, use position: absolute so that the title does not use any space where it is on the page, and text-indent: -9999px; therefore, the text moves from the screen and is no longer displayed, but at least can be read by readers and search engines.

0
source

Here's how I did it, Switch statement

// Get the name node

$ node_name = node_type_get_name ($ node);

// Then just add the content types you want to exclude by overwriting the // // title object with an empty string

  switch ($node_name) { case 'Home page': $title = '' ; break; case 'Event': $title = ''; break; case 'Offer': $title = ''; break; } 
0
source

All Articles