By zazinteractive on
I want to add a label to the body fields of nodes. How can I do this?
For example,
Description:
Node description goes here.I want to add a label to the body fields of nodes. How can I do this?
For example,
Description:
Node description goes here.
Comments
Yes
Go to the edit content -type page. admin/content/NODETYPE/edit or something close to that. Scroll down and I think theres one called "submissions" under the body textbox (forgot the name off hand) and in there you can change the "Body" label to whatever you like.
D7 admin/structure/types/manage/CONTENTTYPE/edit/fields/body and change the name of the body to whatever you want.
Hope that helps.
I have set a label there but
I have set a label there but it's not displayed
Not sure
That should have changed the label. Have you refreshed the cache? You may still be viewing cached pages.
I think that here is some
I think that here is some confusion:
a) node add / edit form: body label is visible
b) node view (= themed node output): body label is missing (and I think that is the problem here!)
How can we include the body label when displaying a node?
You can set the label to be
You can set the label to be Hidden or not on the Manage Display tab for that content type: admin/structure/types/manage/page/display
-----------------------------------------------------
Bob @ Drupal Aid (https://www.drupalaid.com)
Except that the body field
Except that the body field isn't listed on the display page
Your suggested path looks
@kruser:
Your suggested path looks like Drupal 7, but I think this issue is about Drupal 6...
I need to display the label
I need to display the label in the full node view. Can anyone tell me how to do it? Or where to enable it?
There's no option in the display fields to make it visible like CCK fields.
Waiting for the replay. Thanx.
Did you ever get a solution to this?
Did you ever figure out how to do this? I need to be able to do the same exact thing.
Displaying body label
The simplest way of displaying something before the body text will be to add a new field using the CCK module. Activate CCK and add a new field in your content type. After doing this arrange the fields for your content type in the order you want them to be displayed. The new field should be immediately before the body. When you create your content this new field will allow you to type any text you want. You can also use CSS to change its display. Hope this helps.
If you already have data in the database
Thanks for the reply. That's an excellent solution if you're starting from scratch. But, we have about two years worth of data in the existing body field. Is there anyway to get the core body field label to display?
Views
If you use Views and list the body as a field you can add a label. Don't have any links to full node.
Or write a custom node-content_type.tpl.php.
Module Method
If you don't mind creating a new module, how about this as a kludge / solution? Create a simple module that implements hook_nodeapi(), checks for the 'view' operation, and the specific content type you want a label for. If found, output $node->content['body'] with some CCK-style markup wrapped around it.
Something sort of like this (fill in TGT_CONTENT_TYPE and TGT_LABEL as needed):