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)
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?
[/quote]
It's expensive because the current behavior is also expensive, and you're basically doubling it.