By mgregoire83 on
Hi there,
I need to make a different presentation depending if an image is defined, in a CCK Image field named 'field_thumbnail.'
Which could be the code's syntax with the following condition:
1 - If the image is present, I need the following code:
<div id="art-header">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="splitheader_left"><?php print $node->field_thumbnail[0]['view'] ?></td>
<td class="splitheader_right"><h2 class="art-PostHeaderIcon-wrapper"><span class="art-PostHeader"><a href="<?php echo $node_url; ?>" title="<?php echo $title; ?>"><?php echo $title; ?></a></span>
</h2>
<div class="art-PostMetadataHeader">
<?php if ($submitted): ?>
<div class="art-PostHeaderIcons art-metadata-icons">
<?php echo art_submitted_worker($submitted, $date, $name); ?>
</div>
</div>
<?php endif; ?></td>
</tr>
</table>
</div>
2 - If there is no image, the above code:
<h2 class="art-PostHeaderIcon-wrapper"><img src="<?php echo get_full_path_to_theme(); ?>/images/PostHeaderIcon.png" width="23" height="25" alt=""/> <span class="art-PostHeader"><a href="<?php echo $node_url; ?>" title="<?php echo $title; ?>"><?php echo $title; ?></a></span>
</h2>
Thank you !