Hi,

is there any way to prevent attached images being displayed in teaser view?

Also I noticed that images attached to a node by the Upload image module are often aligned very strange, e.g. leaving huge areas of whitespace when several images would fit in a row. Where and how is this controlled?

I looked in node.tpl.php but couldn't find anything related to attachements. Are those part of $content, or where are they built?

Thanks for any pointers! Greetings, -asb

CommentFileSizeAuthor
#3 upload_image_teasers_fix.patch555 byteswhisk
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

beatelic’s picture

try the "Contemplate" Module: http://drupal.org/project/contemplate . There you can define your own teaser and body output. I used it on my side an it works very well, even for other content types too.

asb’s picture

Hi beatelic,

> try the "Contemplate" Module [...]

I tested this some time ago and was pretty confused how to use it right (not much documentation). If I find the time, I'll set up again in an testing environment.

Thanks for the pointer!

Greetings, -asb

whisk’s picture

FileSize
555 bytes

Core Upload module doesn't render file attachments in teasers, but Upload Image do. I suppose it is a bug.
Wrote a patch for this.

beatelic’s picture

I tried your idea. I think it is a good start.

On my site this problem brings a huge performace lack. A gallery contains between 50 to 150 images. A teaser list of 10 galleries loads information on 500 to 1500 files from database. They are loaded, but just not displayed.

I added the

if (!$teaser) {
...
}

to the whole 'view' function and it seemed to work. Have a LOT less queries.

killes@www.drop.org’s picture

Status: Active » Fixed

node->content['upload_images'] = array(
'#value' => theme('upload_images_teaser', $thumbnails),
'#weight' => 49,
);

You can just overwrite theme_upload_images_teaser by an empty function in your theme.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.