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.
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"
Currently I have a Drupal installation which has colorbox installed, this allows me to upload a group of images with some text, each entry is its own entity but are all listed on the same page.
I was just wondering if there is a way that I can display a custom link under each views item (entity). Is this possible?
I'm looking for a quick way to simply add a link that links to the first image of the colorbox image slider.
First, set your Format to Show: Fields. To do so, click the link next to Show: (refer to the picture below) and change it to Fields.
If your Format is set to Show: Fields, you can add a new field of type Global: Custom text. Then, in the text box that appears, simply insert your custom link. If you need to pull in the URL dynamically, use a Replacement Pattern (see the list under the text box).
If you need to use another field as a replacement pattern, add it in the same way as you added the Global: Custom text field but make sure to check the Exclude from display checkbox so that it is not shown in your view.
In my Drupal 7 site, I have an image field called field_photos where users can upload an unlimited number of images, plus an alt description for each one.
I would like to print the alt description as caption for the image. How can I do this?
I know that I have to use my tpl.php file, but I am note sure which variable to use represent the alt value of an image field (especially when a field can have an unlimited number of values).
You should be able override theme_image_formatter() which is called in image_field_formatter_view().
You do not have to use or edit any .tpl.php file. You can access the alt or the title text of the image by doing the following:
Add another field to your View, your node's image field (yes, again)
Ignore the label and display options and go to the fieldset: Multiple Field Settings and uncheck the option: Display all values in the same row
Next, scroll down to the fieldset: Rewrite Results and then click Rewrite the output of this field. Check the Replacement Patterns below and you should see tokens for both alt and title. Use whichever is appropriate.
Works for me!
You can use https://www.drupal.org/project/image_caption_formatter to display the title text of the image as a caption.
I've noticed the images in the products content type in ubercart shop have 2 description fields:
http://dl.dropbox.com/u/72686/doubleDescription.png
I was wondering if I can do this only with programming or there is some module to do it.
Also, it would be nice to have a text area instead of a single line text field for the description.
thanks
Those are not descriptions, those are image attributes that can be enabled during the content type definition.
I wouldn't recomment using long texts in ALT or TITLE, but if you really want to, you can change the field to a textarea implementing hook_form_alter() on that form.
If you look under http://yoursite.com/admin/content/node-type/product/fields/field_image_cache you can see that under Title Text Settings and Alt Text Settings they have those enabled. Just do the same on your content type with the Filefield -> Imagefield field type.
The functionality you describe is provided by ImageField, which is one of the modules recommended from Ubercart.
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.