Template Problem with imagefield Gallery
michaux - October 2, 2008 - 02:11
| Project: | Imagefield Gallery |
| Version: | 5.x-2.0-alpha4 |
| Component: | User interface |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
Configuration template :
- teaser :
<?php
print $node->content['body']['#value']
?>- body :
<?php
print $node->field_vos_images[1]['view']
?>Result :
- view :
I can see my body (normal)
- node :
It's empty (not normal), I should see my pics.

#1
$node->content[blah] is rendered by default in what is coming out of the hook_nodeapi. As such IFG overwrites the existing field that represents your images in $node->content. $node->field_name is not rendered by default, it's just holding the images and you can manipulate it if you like, but that's not how it would normally be rendered.
The whole point of IFG is to prevent the need to do this sort of custom theming. Not that there aren't use cases for it (in which case you should use IFG's theme functions for that) but I'd suggest you turn off your custom theme and see what happens and then tweak from there.
#2
I'm not sure what I'm missing, but if a write the code
<?phpprint $node->field_vos_images[1]['view']
?>
All I get out is my second image. [0] outputs my first etc.
What is the syntax for outputting all my images in the cck-field?
Espen
#3
Using the method you used I do not get my lightbox gallery displayed.
I tried to use this function I found in the lightbox module. The gallery is working but the paths to the images are wrong. I'm not sure what I'm supposed to pass in for $field?
<?php$images = $node->field_photos;
print theme_lightbox2_imagefield_gallery($images , $node->nid, "field-photos");
?>
#4
Does anyone have a solution to this?
I'm close to giving up the module...
The problem is we do not use the <$content> tag in our code (we call every cck-field in the template).
How can we use this module?