Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment | File | Size | Author |
---|---|---|---|
#3 | upload_image_teasers_fix.patch | 555 bytes | whisk |
Comments
Comment #1
beatelic CreditAttribution: beatelic commentedtry 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.
Comment #2
asb CreditAttribution: asb commentedHi 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
Comment #3
whisk CreditAttribution: whisk commentedCore Upload module doesn't render file attachments in teasers, but Upload Image do. I suppose it is a bug.
Wrote a patch for this.
Comment #4
beatelic CreditAttribution: beatelic commentedI 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
to the whole 'view' function and it seemed to work. Have a LOT less queries.
Comment #5
killes@www.drop.org CreditAttribution: killes@www.drop.org commentednode->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.