We're using Views Cycle to display both photo and video content. The problem is that ImageFields and Embedded Media Fields use different fields for their thumbnails. As-is, you can select a thumbnail for one field type, but not the other.
The attached patch changes the thumbnail select to checkboxes, and stores thumbnail fields as an array. Each candidate field is checked, and if it's empty the next one is used.
The code still needs an update hook, and I'm not sure what is best practice here. Options are:
- Do nothing, and throw up a dsm() telling users to re-save their Views using the Cycle plugin.
- Only automatically update in-database Views, and tell users to update in-code views.
- Override in-code Views in the database with the new setting, telling users to re-export their Views.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | 885908_multiple_thumbnail_fields_1.patch | 3.16 KB | deviantintegral |
| Settings screenshot | 27.28 KB | deviantintegral | |
| multiple_thumbnail_fields.patch | 3.1 KB | deviantintegral |
Comments
Comment #1
deviantintegral commentedHere is an update that uses empty() for the testing checkbox options instead of is_array(). Otherwise, all cycles were assumed to have thumbnails.