开发者

Unifying image management (ImageField vs. TinyMCE) in Plone

开发者 https://www.devze.com 2023-03-03 03:10 出处:网络
Does there exist anything akin \"UberSelectionWidget for images?\" I\'d like to get rid of direct-upload image fields and make all images to be managed through an image bank folder.

Does there exist anything akin "UberSelectionWidget for images?" I'd like to get rid of direct-upload image fields and make all images to be managed through an image bank folder.

1) In all use cases upload image to image-bank folder first

2) Pick image from the folder by using some sort of image friendly selection widget (both Archetypes, Dexterity)

This way adding images would be unified within 开发者_如何学PythonTinyMCE editor and news content items.

The problem, however, is that I cannot find any examples for reference picker for images solution.

Please see also Making TinyMCE image pick dialog point to a default folder on Plone

I am willing to replace News Item with my own content type just to get around this problem.


This product helped me in a Plone 3 project:

http://plone.org/products/upload-reference-widget

I had to customize it a little but I think it's a good base to start with.

No Dexterity support IIRC.


Use ReferenceField instead of ImageField in your content types, it make the job done. You can extend 'News Item' type by using schemaextender.

Bonus:

But asking for people to first add image before adding a news is weird. As widget you must use uploadreference widgets for archetypes as mentionned by marcosfromero . It works and let you add an images without going away of your addform.

I'm not sure but there is no z3cform widget at the moment to achieve this (upload & create ref), may be someone can create it or get me wrong ?

0

精彩评论

暂无评论...
验证码 换一张
取 消