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"
Related
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'm using CCK Image field (multi-images) and for each image I have the "Description" field, where I can add the image description.
I was wondering if I can have multi-line description, instead of only one line.
(Even using some specific symbol to go next line)
thanks
If you are wanting a textarea instead of a textfield for the image description field, the only way to do this would be to create a custom module that creates a compound field. There is a really great tutorial on the state of compound fields in Drupal and how to create one here: http://poplarware.com/articles/cck_field_module.
Alternatively, if you only have one image you are uploading, you could disable the description on the image field and create an additional CCK textarea to be used as the description.
When you create CCK imagefield, there is a setting called "Title text settings", where you can set the checkbox "Enable custom title text" and select Input type: textarea instead of textfield.
So now there is nothing you must to specially to make a multiply description for your every imagefield.
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
can I add a CCK image field to another CCK field ? I would like to add icons for each item i add. At the moment I can only write the description.
This would be very cool functionality!
You could do this with JQuery if you want to add an icon by file type. For example see http://www.webdesignerwall.com/tutorials/jquery-tutorials-for-designers/ tip #10.
If you want to be able to specify an icon per item added (so it could be a different icon for every added item) then how you do it depends on how you are displaying it.
So lets say each CCK field is being added to a particular node type and you have a view that lists those nodes then I'd recommend adding a CCK image field to the node (so that each node of the required type has the descriptively named CCK image field and the original CCK field) and then adding a custom template to the view that controls how the image and field are output relative to each other.
I was about to write an example of how to do that but thought I'd check if that describes your needs before I add unnecessary info to the response.... can you clarify what you're trying to do?
You can do this using CCK 3.0's multigroup functionality. Note that there is no stable release for this branch, but it seems to work fine for most use cases.
You would add an image field (icon) and a text field, into a multigroup, and then when adding a new node, instead of the traditional 'add another' button, there is a button to add another group of associated fields.
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