I've added the description field to my Image CCK Fields (in my nodes).
I filled the description field from back-end. However I dunno how to enable it in my front-end.
I cannot display the descriptions. I checked, they are not hided by css. The HTML element doesn't exist.
thanks
This isn't something you can enable in the UI, unless you're using a view. You need to use a template file. More info: http://drupal.org/node/432846
I've solved with Custom Formatter module
Related
I have a content type within which i'm using the Image field type and widget which provides a field for alt text and title. Now I'd like to add another field "link" to each image where I can define a custom link with each image. How can I do this?
Oh, I'm using Drupal 7...
Thanks,
Ron
If you want to avoid having to build your own module, I suggest you try Field Collection module. The module allows you to create a set of fields, combine it into one field and then use it as a field on content type.
You can create a field collection with one image field and link field, then output that as an image with link.
Please try this alter function - "multiupload_imagefield_widget_field_widget_form_alter"
I have a content type which has several fields. When I add new fields to this content type, they get added. I am able to enter data into these newly created fields. But when I publish it, the previously existing fields are shown. But the newly created fields do not appear.
I have checked the permission, cleared the cache.
Am not much aware of using view module. But there exist a view for this content type. Is that responsible for it?
Thanks in advance.
If the page where you want to see your fields is handle by Views, yep definitivly need to look into this views. There a lot of chance that the views only display fields (at the opposite of "full node" or "teaser"), and the fields it display are set in the views configuration.
Some modules will allow granular permissions per cck field.
You might check the user permissions page and see if there is a checkbox for "view {CUSTOM FIELD}" or "edit {CUSTOM FIELD}".
I found out what it is. Actually in the file node.tpl.php , there was an exception for the content type 'article' to print only the predefined fields. So, the newly created fields were not getting printed. But when I added the php code for printing these newly added fields, it worked. Thank you everyone for your time.
In the Views module, if you set 'row style'=fields, you can specify which fields you want displayed. One of my fields is an image type (i.e. I have a content-type that has an image field). As well as displaying the image I want to display the image dimensions and the 'alt' tag. Is there a way of doing this for either of these cases? For example can I add a custom field where I can generate the content with my own PHP or something? Thanks.
I think it is not possible using Views UI, but you can simply create a template for this view and get the informations you need using php inside that template.
Or you can try to use : http://drupal.org/project/views_php (never tried)
i tried to create a custom content type in drupal but unnecessary features like Title, Menu settings, and Revision Information, URL aliases come with it which i don't really want ..coz it doesn't mean anything to the user..
how can i hide all those things, just preserving the fields(say only 3 fields from CCK) that i want only for this custom content type??
thanks..
You can automatically generate titles using the auto_nodetitle module, which also enables you to remove the title field from the node submission form.
As others have mentioned above, most of the other form elements don't appear to non-admin users anyway.
With auto_nodetitle module, you can hide it, not remove it. Then, simply assign a title like "your-content-type-nid", so it will be different for each node (nid will be different).
That would be a better title than an empty one.
You will need to do a combination of things to do what you want. One of those is to add the module auto_nodetitle suggested by others. You can hide the "Body" by removing the "Body field label" from the edit screen for your custom content type. Lastly is that you will have to do the right settings for your CCK fields.
If you have CCK fields you want them to be able to edit and others you do not want them to edit, you will need to enable the Content Permissions module in the CCK section of the modules admin page. Once you've done that, you can go to the role permissions page and set what roles have access to which fields. While permissions can potentially hide CCK fields from the user, you can also control what fields are in the teaser, node, and RSS views via the "Display fields" section of your content type editing screens.
Menu settings, revision info and URL alias type info is admin stuff. If you create a new user that doesn't have admin permissions, I'm pretty sure they won't see it.
Can try some thing like below using hook_form_alter.
function my_module_form_alter(&$form, $form_state, $form_id) {
if($form_id='company_node_form'){
$form['menu']['#prefix'] ='<div style="display:none">';
$form['menu']['#suffix'] ='</div>';
$form['revision_information']['#prefix'] ='<div style="display:none">';
$form['revision_information']['#suffix'] ='</div>';
$form['author']['#prefix'] ='<div style="display:none">';
$form['author']['#suffix'] ='</div>';
$form['options']['#prefix'] ='<div style="display:none">';
$form['options']['#suffix'] ='</div>';
}
}
You might want to try the NodeFormCols module. It does several handy things, among them is to add a Manage Form button which allows you to hide most fields in an input form.
I have a content type named Properties, users can create the content types
I have file cck field in the content type (properties), now I want to add the attachments to the or edit the attachments field only in a block or panel for the particular property.
Not showing all the fields when user try to edit the content type.
I have heard that this is possible in panels using contexts.
Thanks in advance
Not sure I understand what you want here, but it sounds like you want to change the visibility/editability of fields based on role and display.
To change the visibility and/or editibility based on role, use something like this
http://drupal.org/project/field_permissions
To change it based on display, use the "display fields" tab on the content type edit form.
I think this is what you are looking for
http://drupal.org/project/editablefields