用于非图像 CCK 的图像缓存?
我正在创建一个包含图像、视频、音频和文档(书籍)的视图,我喜欢在轮播中显示它们中的每一个的图片。
只要我们向其 CCK 添加图像缩略图(图像文件字段),一切都可以很好地处理图像和视频,但我们希望在不更改原始 CCK 的情况下显示音频和文档的默认图像。是否可以使用imagecache(可能使用imagecache_custom_code或views_custom_php)或者我们需要寻找不同的方法?
感谢您的帮助, 米。
I'm creating a view with images, videos, audio and documents (books) and I like to shown a picture of each of them in a carousel.
Everything works nicely with images and videos as far as we added a image-thumbnail (image filefield) to their CCK but we like to show a default image for audio and documents without changing the original CCK. Is it possible with imagecache (may be with imagecache_custom_code or views_custom_php) or we need to look for a different approach?
Thanks for your help,
m.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以从两个地方执行此操作。
首先,您可以进入 CCK 内容类型设置的显示字段部分,并更改其在预告片和节点视图中的默认显示。您将获得所有当前图像缓存预设作为显示大小选项。
其次,您还可以更改作为视图一部分的输出。将图像添加为要显示的字段将为您提供相同的预设选项集。
You are able to do this from two places.
First, you can go into Display Fields part of the CCK content type settings and change its default display in the teaser and node view. You will be given all the current imagecache presets as sizing options for display.
Second, you can also change the output as part of Views. Adding the image as a Field to show will give you the same set of preset options.
我要说的内容与上面的凯文非常相似,但我认为这是您正在寻找的解决方案。要理解这个问题:
我认为您仍然应该使用 cck 字段。
我可能会误解你的问题。
I'm going to say something very similar to Kevin above but I think it's the solution your looking for. To understand the problem:
I think you should still use a cck field.
I might be mis-understanding your issue though.
感谢你们俩的帮助。
我不想对书籍使用 cck 字段,也不想用 hook_form_alter 隐藏它。
我想我终于找到了一个不需要向我的“非图像”内容类型(音频和文本)添加额外的 CCK 字段的解决方案。
有一个名为“视图自定义字段”的模块 (drupal.org/project/views_customfield),它允许您将 PHP 处理的字段添加到视图中,这样您就可以按内容类型进行过滤并应用 imagecache 或 imageapi 代码
其中“gt_medias_video_346 " 是我的图像缓存预设的名称。
再次感谢你们的帮助,
m。
Thanks for your both for your help.
I don't want to use a cck field for books and I don't want to hide it with hook_form_alter.
I think I finally found a solution that didn't require adding extra CCK-fields to my "non-image" content types (audio and text).
There is a module called "Views custom field" (drupal.org/project/views_customfield) that allows you to add a PHP-processed-field to your view, so you can filter by content type and apply imagecache or imageapi code
Where "gt_medias_video_346" is the name of my imagecache preset.
Once again, thanks you both for your help,
m.