WebGUI
      Click here to register.
      
View Cart (0)
PBWG Banner

View All Tickets
First attachment variable also in CS template  (#366)
Issue

Is it possible to make the attachment.url variable also available in the Collaboration System Template?

Then it's possible to download the first file of a post directly in the overview without going to the specific post. (something like the old File manager)

Comments
JT
0
1/15/2007 2:49 pm
It's of course possible to do that, but it would add considerable weight to the page because then we have to instanciate each file object to get it's url. Having said that though, I'll leave this open, and if it gets up high enough we'll find a way to make it work. Perhaps we can put a switch in the collaboration system properties as to whether this info should be calculated for the template. Then it won't have to affect everyone, just those that need it.
Mike_S
0
10/24/2007 9:24 pm

How is this an expense to get the URL of the first non-image attachment but is not an expense to get the first image attachment?  Couldn't the $post->getImageUrl be tweaked?

Instead of:

    image.url = $post->getImageUrl,

perhaps something like:

    ( $attachUrl, $isImage ) = $post->getAttachmentUrl;

    image.url = ( $isImage ? $attachUrl : '' );

    attachment.url = ( ! $isImage ? $attachUrl : '' );

How is is that more expensive than the current behavior? 

 

JT
0
10/25/2007 4:54 pm
[quote]

How is is that more expensive than the current behavior? 

[/quote]

It's expensive because the current behavior is also expensive, and you're basically doubling it. 

 

Details
Ticket Status Pending  
Rating0.0 
Submitted Byrobbert 
Date Submitted2007-01-15 
Assigned To unassigned  
Date Assigned2008-10-10 
Assigned By 
What to improve?  
URLrfe/request-for-enhancement/first-attachment-variable-also-in-cs-template
Karma
Difficulty 1  
Karma So Far478
Karma Rank478.00
Keywords
Ticket History