Prevent displaying attached images in teaser view

asb - March 25, 2008 - 01:56
Project:Upload Image
Version:5.x-1.1
Component:User interface
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

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

#1

beatelic - April 1, 2008 - 22:10

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.

#2

asb - April 1, 2008 - 22:18

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

#3

whisk - July 30, 2008 - 18:14

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.

AttachmentSize
upload_image_teasers_fix.patch 555 bytes

#4

beatelic - August 22, 2008 - 08:37

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.

#5

killes@www.drop.org - May 17, 2009 - 10:26
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.

#6

System Message - May 31, 2009 - 10:30
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.