Hi all.

small question, i added some CCK fields to gallery images, they displays in Image view, that ok

but they don`t displayed in thumbnails of gallery, how i can achieved it?

CommentFileSizeAuthor
003.jpg44.04 KBTong
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dbeall’s picture

I have been playing with this a little bit.. I have got it working on some of the views, but not all.
This would go in the tpl.php file from node_gallery/theme/*.tpl.php copied to your theme folder.
The [0] is the field data. The ['view'] looks for permission to view the field.
The tags can be whatever.. <h1>, <h2>, <p> ect..
if you name your field as,, field_custom
the code should be

<?php
if ($node->field_custom[0]['view']) { ?>
<h3><?php print $node->field_custom[0]['view'] ?></h3>
<?php } ?>
dbeall’s picture

playing with this more..
--If you want the field to be with the 'cover' or the 'thumbnails' for one gallery.
Gallery Landing Page Setting:
[ ]thumbnails
[ ]cover
--Then the CCK field needs to be in the 'gallery' content type.
--If the landing page is set to thumbnails, the field will either be at the bottom of the list or at the top, depending on where you put the snippet.

For some reason, I can't get it to work in the gallery list view that shows all the galleries in a list...
This should get you fixed up, be sure to clear the cache each time to see the change.

dbeall’s picture

after looking at your screen shot, you don't need any code, just a cck field in the gallery content type.
Unless that is a 'view'. I guess I should ask questions to find out all the details, since there are so many different ways to set up a gallery.

Tong’s picture

hi thank you for answer

items have custom fields through CCK
Price (Euro): 25
Add to Cart

i want to show them in content/transport with thumbnails, how ?
with this ? http://drupal.org/node/697296#comment-2528938

cck field in the gallery content type, they are, but not showing with thumbnails, i guess thumbnails not a teaser ?

Cheers, Tong.

dbeall’s picture

You got me, I don't know the answer to that one.. You might be able to do it with a better views handler.

DesignWork’s picture

Dear Tong,

so tell me you have a gallery_node_type with custom CCK fields and you want the fields to display with the (single) image? If so there is no easy way to do this because the image is a own content type. If you just want to display the costum CCK fields in the Gallery Landing page you do it by theming the tpl files.

Cheers

Dirk

arturus-1’s picture

I want show EXIF info of foto on thumbnails. I use for this Exif modul http://drupal.org/project/exif and add CCK field for node-gallery-image with name "field_ifd0_model". How can I do this?

DesignWork’s picture

Hi arturus,

you go to the node-image-default.tpl.php. You copy it to your theme folder. Then you put the following comand at the bottom of the template file print_r($node); .
Now you serach for a string like node->field or search for field.

You should be able to identify your CCK field in the end you print your field where you want like print $node->field['xxx']['#value']

dddave’s picture

Priority: Critical » Normal
dddave’s picture

Status: Active » Closed (won't fix)

NG3 is the place to be (and receive support).