Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi:
Can anyone advise me as to how to show the field labels when displaying nodes created with CCK.
Ideally, it would also be able to tag the label and the content with different CSS labels.
Thanks
Comments
Comment #1
KarenS CreditAttribution: KarenS commentedThe field modules as they are currently configured just return the value with no label (as you have noticed). I have been playing around with a way to allow the admin to format the output. I just created a module for a select box/textfield/radio box (http://drupal.org/node/55002) and in the settings I provide options for how the field would be displayed, including a label and div, a dl, plain, in a table, etc. My thought was that the same formatting options could be added to all the other fields. If you're interested, try out the module I created and provide some feedback on what you think of the way the configuration of the output is designed. If people like it, I can provide a patch for the content module and all the other field modules so they have the same functionality.
Comment #2
codexmas CreditAttribution: codexmas commentedWicked stuff, just reviewed the code for your option module.
Nicely laid out and well planned. I will test it out today and give
some feedback, the label presentation is a great idea.
Gord.
Comment #3
amccann CreditAttribution: amccann commentedSorry for the long delay...this is a great idea.
Comment #4
JonBob CreditAttribution: JonBob commentedField labels are now shown by default, and can be very simply suppressed in the theme. The examples distributed with the module show how to do this easily.
Comment #5
(not verified) CreditAttribution: commented