Dexterity and a list of namedfile/namedimage

71 views
Skip to first unread message

Mohd Izhar Firdaus Ismail

unread,
Mar 28, 2011, 12:50:58 PM3/28/11
to dexterity-...@googlegroups.com
Hi all,

I was experimenting around with dexterity to create form field which
allow multi-image quite some time ago. Along the way I faced issues in
getting the images previewed and loaded which gave birth to this
monkeypatch+overrides product:

https://svn.plone.org/svn/collective/collective.arraynamedfile/trunk

monkeypatches:
* z3c.form.widget.MultiWidget.getWidget is patched to allow
subwidgets to access the context
* plone.formwidget.namedfile.widget.NamedFileWidget.download_url is
patched to return the right url to the file/image
* plone.formwidget.namedfile.widget.NamedFileWidget.extract is
patched to get file removal working

overrides:
* plone.namedfile.browser.Download is replaced with a view that works
with schema.List
* plone.namedfile.scaling is replaced with a view that works with
schema.List, and also allow <scalename>_square which returns cropped
square scaling of image, for use in gallery thumbnails or similar.

I'm not sure what are right/correct ways to do this .. though a
generic way to have subwidgets of schema.List working well would be
really useful i think, as afaik, theres no ArrayField equivalent for
dexterity yet (at least i didnt see any of them yet)

or perhaps the dexterity gurus have other ideas on this..

--
Mohd Izhar Firdaus Bin Ismail / KageSenshi
Inigo Consulting (FOSS/Plone Development, Training & Services)
http://www.inigo-tech.com
Fedora Malaysia Contributor & Ambassador
http://blog.kagesenshi.org
92C2 B295 B40B B3DC 6866  5011 5BD2 584A 8A5D 7331

Baumann Jonas

unread,
Mar 29, 2011, 1:58:16 AM3/29/11
to dexterity-...@googlegroups.com
hey

maybe plone.formwidget.multifile could work for you?
http://svn.plone.org/svn/plone/plone.formwidget.multifile/trunk/

I think its not yet released ...

Cheers
Jones

> --
> You received this message because you are subscribed to the Google Groups "Dexterity development" group.
> To post to this group, send email to dexterity-...@googlegroups.com.
> To unsubscribe from this group, send email to dexterity-develo...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/dexterity-development?hl=en.
>

Reply all
Reply to author
Forward
0 new messages