Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
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.
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.
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.
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?
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']
Comments
Comment #1
dbeall CreditAttribution: dbeall commentedI 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
Comment #2
dbeall CreditAttribution: dbeall commentedplaying 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.
Comment #3
dbeall CreditAttribution: dbeall commentedafter 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.
Comment #4
Tong CreditAttribution: Tong commentedhi 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.
Comment #5
dbeall CreditAttribution: dbeall commentedYou got me, I don't know the answer to that one.. You might be able to do it with a better views handler.
Comment #6
DesignWork CreditAttribution: DesignWork commentedDear 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
Comment #7
arturus-1 CreditAttribution: arturus-1 commentedI 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?
Comment #8
DesignWork CreditAttribution: DesignWork commentedHi 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']
Comment #9
dddave CreditAttribution: dddave commentedComment #10
dddave CreditAttribution: dddave commentedNG3 is the place to be (and receive support).