By davide1982 on
Hi guys!
I'm trying to hide titles of my nodes from being displayed in view mode.
Recently I was advised to use auto_nodetitle. It really helps with creating of automatic titles and hiding the Title field in Edit form (when user submits new content). But when users view the site titles of nodes are still visible.
Does anybody have some ideas ?
Comments
I'm in need of this too,
I'm in need of this too, frustrated as it seems like this ought to be one of those really entry-level things that should be considered necessary, basic functionality.
Here are some things I've tried:
http://drupal.org/node/399112
http://drupal.org/node/138910
and there's a comment down the page on http://drupal.org/node/221854 that gives code to let you hide the display of node titles by adding an underscore at the beginning of the title name.
But none of them have done anything, I'm still left with titles displaying on all my pages, even the front page. None of these 'fixes' have had any effect. I'm running Drupal 6.6 with the litejazz theme. Anybody got any advice?
Fixed
Ok, got it. The above-mentioned fix that is referred to in a comment on http://drupal.org/node/221854 finally worked, it was the last thing that I had tried and I had forgotten to run cron after adding the code to my page.tpl.php.
Hunt through that file until you find the title listing and edit it to look like this (taken completely from nstrassner's comment on the above node):
Save your change and run cron.
Then anytime you want the title not to display, begin the title name with an underscore (such as _qwerty) and that title will not be displayed.
This works great, except that
This works great, except that the page title is also used as a menu's title attribute in primary and secondary links:
<ul class="links primary-links"><li class="menu-249 first last"><a href="/home" title="_Home">Home</a></li></ul>Any suggestions for removing the "_" from the title attribute?
Potential Module
Okay, here's what I've come up with so far:
hide_node_title.info
hide_node_title.install
hide_node_title.module
hide_node_title_preprocess_page() isn't working and I don't know why, so I've resorted to using drupal_set_title() in hook_nodeapi. That means that the node title is removed from the <title> tag, but I'm using Page Title module and can put that back. Comments are welcome to improve this.
In the end, this provides an easy way to hide the node title without affecting other uses of the data.
Subscribing, Still needing it
Subscribing,
Still needing it on views-level and not on every node level.
I want the node-titles on one particular view be hidden. I use them to arrange the view, so may be some css will do the trick.
Did anyone succeed in hiding the node title without altering it, on views level?
Thanks a lot in advance for your reply!
greetings,
Martijn
Subscribing,
Subscribing,
subscribing
subscribing
Try to use
Try to use drupal_set_title('') I should remove the title
--------------------------------------------------------------------------------------------------------
if you can use drupal why use others?
VicTheme.com
Subscribing
Subscribing
Create a "Hide Title" field, then test in the page.tpl.php
I've used a theme based technique in the past, to allow node level control.
1. Create a Hide Title field via CCK
2. Do a quick test in your theme page.tpl.php
3. Print the title
I would NOT recommend this if you want to control this by content type.
Subscribing!!
Subscribing!!
---~~~***~~~---
aac
http://drupal.org/project/exc
http://drupal.org/project/exclude_node_title
What's new and changing in PHP 8.4
Holy Cow Thank You.
Finally! I'm ecstatic!
brilliant
says it all...
thank you...
george
I would still like to know
I would still like to know how to set this in the render_array for a $view_mode. Perhaps that's not possible, though.
A permanent fix
Posted on wrong thread.
That is my way to achieve the
That is my way to achieve the target:
1. Under FORMAT choose "show: Fields" instead of " Content"
2. Under FIELDS: add the fields you want to show in the view, such as Content: Body, Content: Image, etc.
3. Remove Content: Title if it is in the list by default.
@jiangleo Great solution!
jiangleo, Great solution!
No code involved! classic!
Thanks for sharing!!
ZOMG thank you.
I'm late to the party but this little guide totally save my butt tonight. The selective use of fields in the view saved this cowboy's bacon. Thanks a bajillion!
I would like to be on record...
...saying that on/off functionality for node titles and displaying them needs to be a part of Drupal. Sometimes you need a node with no visible title. Sometimes you don't want to go spelunking into code to do that.
This can be done with display
This can be done with display suite.