Monday 15 March 2004 1:57:41 am
Hi As I understand it you have two problems. Need to scale image and conditional template code for displaying folders with and without an image. Image scaling is set up in the settings/override/image.ini.append. There you will find lots of stuff. Basically you must make an filter for your image. For example:
# Scale images to 230;110. NOT keeping aspect ratio
[ingress]
Reference=reference Filters[]=geometry/scaleexact=230;110
# Scale images larger than 460;460 down to keeping aspect ratio.. I.e the image is simply NEVER widther og heigher than 460 px.
[xlarge]
Reference=reference Filters[]=geometry/scaledownonly=460;460 Then in your template you must use code to view images:
{section show=$item.data_map.bilde.content.is_valid}
{* Image is available *}
<a href={$item.data_map.bilde.content.orginial.url|ezroot}>{attribute_view_gui attribute=$item.data_map.bilde image_class="ingress"}</a>
{* Image size is controlled by using image class="filtername", where filter name is in image.ini.append.
{section-else}
{* There is no image *} {/section} PS: Replace $item with $node if not within an sectin loop.
Cheers Tore
|