如何让 Drupal 编辑器在上传到 imagefield 时选择图像缓存预设?
有人知道有一个模块允许内容编辑者单独为每个节点选择图像缓存预设吗? 我希望编辑人员每次将图像上传到图像字段时都能够在 3 种不同的预设之间进行选择。
我已经考虑过的事情:
- 添加选项字段以进行预设选择,然后检查这些 节点模板内的选项用于输出右侧的图像 预设。前段时间这样做过,但维护起来不好 进行更改或添加内容类型。
- 有 3 个图像字段,每个预设一个,并使用单选按钮和条件字段模块仅显示当前选定的图像字段。 不幸的是,还不建议在 Drupal 7 上的生产环境中使用条件字段。
Is somebody aware of a module that allows content editors to select an imagecache preset for each node individually?
I'd like my editors to be able to choose between 3 different presets each time they upload an image to an imagefield.
Things I already considered:
- Adding option fields to make a preset selection and then check those
options inside the node template to output the image with the right
preset. Did that sometime ago but it's not good to maintain when
making changes or adding content types. - Having 3 imagefields, one for each preset and using radio buttons and Conditional Fields module to only display the currently selected imagefield.
Unfortunately Conditional Fields is not recommended for production on Drupal 7 yet.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
似乎确实有一个,格式化程序字段:
它执行如下操作:
这看起来像您所追求的。
请注意,目前它处于 -beta2 版本,因此可能需要一些测试
There does appear to be one, Formatter Field:
It does something like this:
Which looks like what you're after.
Be aware it's in -beta2 at the moment so might need a bit of testing
“添加选项字段以进行预设选择,然后检查节点模板内的这些选项以输出具有正确预设的图像”
“尚不建议在 Drupal 7 上的生产中使用条件字段”
您可能想检查以下链接:
http:// /api.drupal.org/api/examples/form_example--form_example_states.inc/function/form_example_states_form/7
http://randyfay.com/states
"Adding option fields to make a preset selection and then check those options inside the node template to output the image with the right preset"
"Conditional Fields is not recommended for production on Drupal 7 yet"
You might like to check the following links:
http://api.drupal.org/api/examples/form_example--form_example_states.inc/function/form_example_states_form/7
http://randyfay.com/states