Upgrading
Last updated
Last updated
In an effort to be more aligned with the native ExpressionEngine File Manager, the Caption field has been renamed to Description. When upgrading all field settings and database columns will be updated as such. If your template is using the {img:caption}
variable it will still work. There is now an {img:description}
tag.
Since Ansel and the native File Manager both have a Title and Description field, there is a new hidden config variable that when enabled will keep the two in-sync. This config value can be added or removed at any time (it defaults to 'n'), but if you add this to your config.php file prior to upgrading it will copy all the Title and Description field values from your Ansel files to the native File Manager. E.g. $config['ansel_sync_meta_fields'] = 'y';
Not using the ansel_sync_meta_fields
variable, or setting it to n
, will make Ansel operate as it did in previous versions. Adding it will turn on the new metadata sync behavior.
Once an image is saved, the edit meta button will become available (screenshot below). Clicking this will let you edit the meta data of the cropped image, not the original source image. This lets you add a Title and Description that is unique to each usage. This is where you might want to decide if you want to keep the meta fields in-sync with the native FIle Manager. This does not change the front-end behavior when displaying images within an Ansel field. The syncing is mostly available for convenience and consistency. For example, if a content editor who isn't aware of how Ansel or the File Manager worked viewed a cropped image from within the ExpressionEngine File Manager, and chose to update the Title or Description fields it would not update the values of the image in the entry, and thus not reflect the changes on the front-end. However, if you enable syncing, the cropped image will be updated as well and the changes will be reflected on the front-end, and the next time the entry is viewed and edited.
If ansel_sync_meta_fields
is enabled, then changes made to the Title and Description field in the image slide out will update the the Title and Description in Ansel. Conversely, if the Title or Description is updated in the Ansel field, and the entry is saved, then the Title and Description field in the slide out will also be updated. These are separate fields stored in separate database tables, only when ansel_sync_meta_fields
is enabled will they be kept in-sync.