Hello,
I've created a content type (CCK) for displaying information and links to external photosets in a certain way. When someone goes to the taxonomy that displays these nodes, I would like to hide the node titles. Reason is that the way I'm doing this the user can see the entire nodes in the list and each node has a link that takes them to the photoset on an external site. Having a node title that takes them to see a single node view identical to what is in the list is useless.
I've tried playing with views, but page type views don't seem to offer this option. I also tried the Views theming wizard, but it was over my head. I've already used contemplate to make my node content look the way I want, but it doesn't affect the display of node title in a page view. All I need now is to create a page to display these nodes without titles.
Any thoughts appreciated.
- Peter
Comments
sounds as if you need to
sounds as if you need to theme the relevant CCK content type
have a look at some of the node.tlp.php in the themes section for some ideas,
depending on the structure ie if you use args()
you can filter this into how the node information is displayed
sorry for not more detail its a huge topic to cover and Im a little pressed for time
This probably isnt what you are looking for as it is dealing with plain vanilla nodes and not CCK but the methodology is the same
http://chapterthreellc.com/node/69
you need not write a function but could get away with hacking the content....tpl.php files
Sounds like that is where I need to go
Was hoping there might be something where I wouldn't have to monkey with theming so much.
One follow up question. If I'm going to create a custom note.tpl.php file for this content type I should be able to do everything I want there, and skip trying to use contemplate yes? Or does it make sense to do both?
I guess I'll find out when I try it!
- Peter
'Was hoping there might be
'Was hoping there might be something where I wouldn't have to monkey with theming so much.' -- That should be my mantra ;)
But it's not that hard once you get started :) I've done the same sort of thing on my site, following this handbook page: http://drupal.org/node/17565
Just make a copy of node.tpl.php, and rename it for your content type.
You want to remove all the section that starts
<?php if ($page == 0): ?>from the new file, down to and including the endif -- 4 lines in total.These put in the node title & link to the node in a teaser list, which is what a view gives you. (In a page, the title is already put there by the page template.) The $page variable is 1 if the node is being shown as a page, 0 if it's shown as a teaser.
You'll lose the title in all places where these nodes are shown as teasers, such as other views and the front page.
Hey Thanks!
Very specific - I'll have a go at it tonight.
Thanks,
Peter
One more question
Is the best practice here to create a new theme?
I've already done that on my site. Basically duplicated the theme I was using under another name. That way I'll have any theme changes separate from the original.
Also, how much do themes change functionality from one Drupal version to another? I'd hate to do a lot of theme work only to find out I have to redo a lot of it when I upgrade to a new version.
Thanks again,
Peter
thank you so much
you don't know how much your little posting has helped me in demanding situation.. thanks again
The Fix: How to Remove the Taxonomy Node Title
We agree that the Title is redundant for the content. It's not a View issue - you have to make the change within the Taxonomy module (which we are qualifying as a hack for now until the "view title on node display" feature is added to the Taxonomy Admin. Here's how you do it.
Drupal v. 5.1
Taxonomy v. 1.3
1) Open the Taxonomy module file with a Text/Code editor (preferably one that displays code lines). The file is found drupal_root_folder>modules>taxonomy>'taxonomy.module'
**(We always recommend making a backup copy of the file, e.g. 'taxonomy_bkup.module', prior to editing.)
3) Code line 1359
drupal_set_title($title);(The title of this section, in comments, is 'Menu callback; displays all nodes associated with a term.' - it's located about 95% toward the bottom of the document.)
3) Edit as
drupal_set_title(''/*$title*/);4) Save the file to the original location
You should be good to go.
For what it's worth, we've just uploaded a copy of the edited taxonomy module. You can just download, unzip and use our file as your taxonomy module.
http://kitchen.oyoaha.com/node/23
--
Rock it,
oyoaha
kitchen.oyoaha.com
Interesting Option
You're suggesting I hack a core module? Seems like an unusual way to go.
Personally, I try to avoid contrib modules that don't have strong community support, and any kind of hack to make it easy to continue to upgrade to new versions.
I wonder if you are misinterpreting my question? I was asking about how to not display the node titles for a particular content type when displayed as teasers in a list. Not how to remove the taxonomy name from the top of a Taxonomy list page.
Now that you mention it, that is redundant so that is probably a good change, but not high on my concerns list at the moment.
Thanks though - interesting.
- Peter