[themes] Contemplate theming

Mark Hope mark at markhope.net
Thu Oct 5 11:38:13 UTC 2006


Hi again,
I've found the solution under Contemplate Module > Issues

http://drupal.org/node/79188


Mark
(getting used to finding my way around drupal.org)

On 5 Oct 2006, at 08:58, Mark Hope wrote:

> Hi,
>
> I'm having difficulty achieving some output using the Contemplate
> module - hope somebody can help out.
>
> I'm using CCK, imagecache and contemplate to produce a 'case study'
> content type. The teaser view page has been customised using
> Contemplate module, inserting a thumbnail image created by Imagecache
> module (namespace of 'focuson').
>
> The code is outputing markup for the image thubnail even if the
> imagefiled ($field_focus_on_thumb) is empty.
> How do I create an array for only items that have the used the
> imagefiled ($field_focus_on_thumb)?
>
> code:
>
> <?php foreach ((array)$field_focus_on_thumb as $item) { ?>
> <div class="field field-type-image field-field-focus-on-thumb">
> <div class="field-items">
> <div class="field-item">
> <img src="<?php print $GLOBALS['base_url']
> ?>/files/imagecache/focuson/<?php print $item['filepath'] ?>"
> alt="<?php print $item['alt'] ?>" title="<?php print $item['title']
> ?>">
> </div>
> </div>
> </div>
> <?php } ?>
>
> <div class="field field-type-text field-field-teaser-text">
> <div class="field-items">
> <?php foreach ((array)$field_teaser_text as $item) { ?>
> <div class="field-item"><?php print $item['view'] ?></div>
> <?php } ?>
> </div>
> </div>
> <div class="links"><a class="read-more" href="/<?php print $path
> ?>">read more</a>&nbsp;&raquo;</div>
>
> Thanks
> Mark
>
> _______________________________________________
> themes mailing list
> themes at drupal.org
> http://lists.drupal.org/mailman/listinfo/themes
>



More information about the themes mailing list