Regarding to the images:
if you use:
<?php
$imagePath = $node->field_image_cache['0']['filepath'];?>
<div id="image"><img src="/files/imagecache/product/<?php print $imagePath; ?>" alt="Title"></div>and there is no image, no image is display at all and there will be the image not found symbol.
While using the foreach (I prefer this way), without checking if their is an image, you'll get an error in 'foreach'. I check if $node->field_image_cache is not NULL.
<?php
if (!$node->field_image_cache == NULL) {
foreach ($node->field_image_cache as $image) {
// ... // display image
}
}
?>Is their a better way to display images in custom node-product.tpl.php?
TIA,
Fossie
