Drupal 7 Exclude Node Title Module

By shane
Fri, 2014-11-07 06:37
comments
Daily Dose of Drupal Episode #177

Share with Others

Have you ever had to try to hide a title on a page in Drupal? Maybe you created a page to be your front page and don't want the Node title to show up. The Exclude Node Title module makes this situation or any other situation in which you need to hide a node title, as simple as a few clicks of the mouse.

Hello everyone and welcome to another Daily Dose of Drupal. Today we’re on Episode Number 177. I am Shane Thomas, make sure to follow me on Twitter at smthomas3 and if you get a chance to take a look at codekarate.com, look at the EBook, check out some of the chitchits we’ve been releasing and let us know what you think or if you have any other ideas.

Today we’re going to be going over the Exclude Node Title Module and this is one of the simplest modules you’ll probably find out there but it’s also useful in a lot of situations. This will be a really quick video so we’re going to go ahead and just jump right in. The Exclude Node Title simply lets you hide the Node Title of various nodes on your Drupal site.

So the first thing we want to do is make sure we have the Exclude Node Title downloaded and installed which in this case we do. It has a number of permissions that go along with it. You can administer Exclude Node Title which of course is for the admins, you can exclude any node title, exclude your own node titles and this important was Use Exclude Node Title which simply means if you have the checkbox and you are trying to exclude that title you’ll actually see it.

The default permissions are usually pretty good to go so you don’t need to do much configuration there. So we’ll go ahead and leave that. There are configuration page for the Exclude Node Title modules under Configuration Content Offering and Exclude Node Title and it allows you to do a number of things and it’s all based on content types. So the first option, you can remove the Node Title from Search Pages if you would like, we’re going to leave that unchecked.

Here’s some information about translations if you want those to be synchronized but the important part is right in this section, the Exclude Title by Content Types. So essentially what you’re able to do is you go to the content type you want to hide the Node Title for. In this case let’s go to article. You can hide it for all articles or specific nodes. So let’s go ahead and select all nodes. Before we do I’m going to go back to the homepage. There’s a bunch of different contents in here but on the second page there’s a number of articles so as you can see with this word article are article pages on the site. So you see the title there if we go to the actual node page, you do not see the title because I had that configured earlier. But we’re going to go ahead and hide the title for all nodes and we’re only going to hide the teaser in this case just to see how that’s going to work.

So if we save it and we come back to this page you’ll notice the node title is now gone on all of those article nodes. If I go to the page though the node title is displayed. If I want to change that so it does not display on a full node page or the full content page, I simply click that checkbox and save and now the title will be gone.

If there are specific nodes, let’s say you have a page that you’re displaying on the homepage of your site and you did not want the node title to show up on the homepage, you could simply select the content type so it could be basic page but we’ll use article and select User Defined Nodes. Let’s only check full content for now and we’ll click Save. If we come back to our list of articles and we refresh, you’ll see that the article title is now there.

If we go into the article make sure we save this, I believe this was one was already checked. You’ll see there’s a check box here. Exclude title from display. If we uncheck that the title will show up and if we check it the title will go away. So let’s look at a couple of other articles here, now the title is gone. If we go to a node that is not an article, so this one is not an article node. You’ll see there is no checkbox so you can’t hide that node title.

So it’s pretty flexible in what it allows you to do. If you go to another article here you’ll see it’s not checked by default. You can check it, click Save and now this title will not be displayed. So there’s a number of reasons why this might be useful. So whether you need to hide a title on a specific page or there’s specific content types where the title just doesn’t create a lot of value and you want to just hide that from the user. You can use this module to do that.

So go ahead and try it out, there’s a lot of situations in the past where I’ve used the template .php file to hide titles or use a CSS in the past to hide title on a few pages. So this just kind of consolidates that and allows you to do it through a nice interface rather than having to write a whole bunch of small snippets of code depending on the site or the specific used case you need. So let us know what you think, check out codekarate.com and we’ll see you next time. Goodbye!