By matt v. on
Can anyone suggest a way to remove the node title when viewing a particular type of CCK node type?
I tried the Automatic Nodetitles, but that apparently only hides the title when *creating* the CCK node, but the title still displays when viewing the node. I tried Contemplate, but the title apparently seems to get added before Contemplate does its customization. The same seems to go for the node-example.tpl.php, as far as I can tell.
Any suggestions?
Thanks!
Comments
no suggestions here, but I
no suggestions here, but I am struggling with the same problem
Hi Matt V. - If you are in
Hi Matt V. -
If you are in Drupal 5, you should be able to make a custom node template that will do this, as you describe.
If your content type was "blog," for example, you would duplicated node.tpl.php, and rename it node-blog.tpl.php, and in there you can comment out or remove the
<?php print $title ?>. Not sure why that isn't working. What are the other variables that you have in the node.tpl.php? You can always print a list of them by pasting:<pre><?php print_r($node); ?></pre>in the node.tpl.php file and you can see all the pieces you are working with.Hope that helps.
Stumbled on this when
Stumbled on this when running into a similar issue.. in my case, I wanted to remove the title from all nodes. After removing the title from my custom node-[content-type].tpl.php the title was still appearing.. Had overlooked the obvious here... the title was still globally being defined by the page.tpl.php.
The trick was to add the following to my page.tpl.php, above the basic title info:
(found on the forums.. but cannot find where)
Hope this solves your issue...
Alternatively
Alternatively in your theme, you could copy node.tpl.php to node-NODE_TYPE.tpl.php then just remove the
<h2><?php print $title; ?></h2>altogether.Or you could style it out by adding a class to the h2. Change to read
<h2 class="invisible"><?php print $title; ?></h2>and addh2.invisible {display:none;}to your style.css file.Bookmarking, greetings,
Bookmarking, greetings, Martijn