Hi all

Having successfully created my own content type (AstroImage), I would like to create a simple 'gallery' showing a thumbnail of the body image of each node. The nodes would also be grouped into 'albums' by Taxonomy.

Now, I have been able to make a start for a single image using the following:

<?php

$query
= new EntityFieldQuery();
$result=$query
 
->entityCondition('entity_type', 'node')
  ->
entityCondition('bundle', 'basic_image')
  ->
propertyCondition('title', 'Image2')
  ->
execute();

$nid = current($result['node'])->nid;
$node=node_load($nid);
echo
drupal_render(node_view($node));
?>

But this renders the whole node.

Example:
I have 20 AstroImage entities, 10 of which are tagged as 'NGC'.
When a visitor clicks on a link to show all 'NGC' images, they are taken to a new page which shows the 10 thumbnails. They then click on a thumbnail to be taken to the full node to view all the image details.

Can someone point me in the direction of a how-to to extract the image field from the nodes (field_astro_image) and output that?

Thanks in advance
Daz
Win7 64-bit
Drupal 7.19
WAMP 2.2
Apache 2.4.2
PHP 5.4.3
MySQL 5.5.4

Comments

this topic should be place in

this topic should be place in http://drupal.org/forum/4.
if you are new in Dupal you must try to learn for VIEWS module, with this module you can solve these cases in 10 mnt, may be less.

ꦱꦠꦽꦶꦪ

nobody click here