Hello, I have a content type I've created with CCK that gets promoted to the front page, but I want to modify the info/fields that are automatically generated with it (title, user, date, submitted by, etc).

Is it possible to determine whether or not those fields are shown? I'd prefer to eliminate the title, or at least have it not link to the full node. I suppose I could find all the info in the style sheet and set it to display:none or something like that.. but i'd rather define how the fields are handled by content type automatically.

I've downloaded and installed the 'Page Title' and 'Contemplate' modules.. but I guess my php skills arent strong enough to use them properly.

Any suggestions for how to modify/eliminate/hide these fields? Thanks!!

Comments

antibob’s picture

You can decide how to show the added fields under >admin/content/types/preview/display. Here you can choose how to display a certain field in the teaser and how to show it in the node. I don't know a simple way to disable the title though.

fresh-off’s picture

thanks for your response antibob!
you know, i tried poking around those screens but was never able to access any fields other than "body" field - which i'm assuming leaving blank would omit the ENTIRE body.. When I clicked on some of the other tabs (Manage fields/Display fields) I would get this message:

There are no fields configured for this content type. You can Add a new field.

That message wasnt helpful because I'm trying to remove/modify existing fields - not add new ones. Am I doing something wrong? Indeed, the destination you gave me seems like the logical place to modify the node fields! Obviously from my other post in this thread i did find a solution, but I'm confused why I wasnt able to make your solution work!

thanks again!

----

brendan, fresh-off.com
Creative Direction & Consultation: Web | Print | Brand

http://fresh-off.com
seatte.usa

antibob’s picture

You couldn't remove any fields under "Display Fields" because the default fields (Title, Body) are inaccessible this way. In the menu I linked you can only modify fields you have added using CCK.
Looks like I misunderstood you in the first place and gave you not the right hint - well, you ended up doing it the right way anyway ;)
In case you want to learn more about playing around with CCK, you should watch the first screencasts over at Drupaldojo that are dealing with this kind of problems: http://drupaldojo.com/lessons?page=8

fresh-off’s picture

After quite a bit of searching through the forums, here's what I ended up doing. I found the node.tpl.php file in my theme, copy and saved it (in the same folder) as something like: node-name_of_my_content_type.tpl.php. I then edited the the html and php tags that were creating the fields I didnt want. Actually, I just commented them out! Problem (apparently) solved!!

I'm still STEEP in my Drupal learning curve, but —assuming creating the new node.tpl.php file isnt bad form— I feel like I just learned one heck of an important Drupal trick!! I presume if I had a list of variables that my content type can access, then by creating the new node.tpl.php file I'll have complete control over how things/fields are presented for any particular node!!

------

brendan, fresh-off.com
Creative Direction & Consultation: Web | Print | Brand

http://fresh-off.com
seatte.usa

ryanoff’s picture

for a complete list of your variables available, try putting in a print_r($node) as the first line in your template file. This will display quite a lot of what is available (I'm not positive if that is all of them though).

Also, install the "Devel" module and try the "devel render" tab which will also show most of the available variables.