Tony
Tony

Reputation: 136

How to add descriptions under uploaded images

I have created an image field in a content-type called "Products", but there is no description box option as it is shown in a file field. Is there any ways to add product descriptions under every product photos?

Upvotes: 1

Views: 3903

Answers (3)

tyler.frankenstein
tyler.frankenstein

Reputation: 2344

Try the Image Field Caption module for Drupal 7.

It adds an extra text area to image fields. It is similar to the alt/title text fields already available with an image field, except it is a text area that accepts long string or html content.

  1. Download the module
  2. Enable the module
  3. Add a content type with an image field, or use an existing content type with an image field
  4. Add or edit a node with an image field
  5. Enter text or html into the image field caption text area
  6. Save the node and view it to see the caption displayed below the image field

To override the way the caption is displayed, take a copy of the image_field_caption.tpl.php file and place it in your theme's directory, for example:

sites/all/themes/MY_THEME/image_field_caption.tpl.php

Now modify the html to meet your needs.

Upvotes: 1

Cyclonecode
Cyclonecode

Reputation: 30001

I know this isn't the optimal solution, but you could use field_collection to achive this. Install the module and then add a new field of type field_collection to your content-type, then under admin/structure/field-collections you can add both an image and a textarea field. Now you should have the ability to add an image and a corresponding description to your node.

Upvotes: 1

squarecandy
squarecandy

Reputation: 5107

This has been identified as an issue - the integration of imagefield into core from D6 to D7 saw the unfortunate loss of the option for a description field in addition to alt and title.

Try this patch: http://drupal.org/node/1067620#comment-5958190

Upvotes: 0

Related Questions