More formatters for cck

cirotix - April 29, 2008 - 00:32
Project:Asset
Version:5.x-1.0-beta2
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:won't fix
Description

Here is a patch that give you several new formatters for CCK. They are formaters that must be used with a tpl as they returns the aid, the filepath or an array of the main informations of the asset.
It might or might not be useful for others so feel free to include it or not in the module.

Of course, the rational behind this is that IMO the format of an asset should be field dependent. It also should be handled in a smarter way than my solutionn but I had to get that work fast so I've done it that way. Getting the aid or the filepath let you do what you want in the tpl file.

AttachmentSize
asset_cck_formaters.patch1.31 KB

#1

wmostrey - April 30, 2008 - 11:24
Category:task» feature request

Thanks a lot for this Damien, I'll try these out and think about implementing this. Currently asset_load doesn't return the filepath for instance, which it should. I'm not sure if these handlers should go into different calls.

#2

wmostrey - September 15, 2008 - 10:01
Status:patch (code needs review)» won't fix

I'm all for more formatters but it looks to me like http://drupal.org/node/286919 is more what people will be expecting. You can always add more formatters by writing your custom module, or by contributing an asset_cc_extra module for instance.

#3

cirotix - September 26, 2008 - 13:17

I like what is described in http://drupal.org/node/286919. Is it implemented in the last version of asset 1 ?

 
 

Drupal is a registered trademark of Dries Buytaert.