Key highlights
- Image collections: one layout area can hold several images in an order that the editor sets.
Every Core dna product, release by release, newest first. Each product ships on its own schedule.
Image Collections and Bug Fixes
A new input type category holds an ordered collection of images in one layout area. PDFs now render with DOMPDF, and Cloudinary processes all images.
content.recordId (before: content.record) or content.recordIds (before: content.records).A new input type category, Images (Multiple), lets one layout area hold a collection of images. Each site has an input type named Image Collection that uses it. To make another, go to Customization › Input Types, add an input type and set Category to Images (Multiple).
On a layout area that uses such an input type, Required, # Min. images and # Max. images set how many images an editor must and can select.
In the content editor, Browse assets opens the asset browser, where an editor selects several images and chooses Use selected images. Upload images adds new files. The editor drags the images into order and removes one with Remove image. The area accepts each image one time.
In a template, getAreaImages() returns the images in the order the editor set. It returns an empty collection when the area has no images. Pages, blog posts, book pages, FAQ pages and questions, product and category descriptions, custom entity records and components all have the method.
{* The images of the "gallery" area, in the editor's order *}
{foreach $page->getAreaImages('gallery') as $image}
<img src="{$image->getResized(800, 600, 'fit')->getPath()}" width="800" height="600" alt="">
{/foreach}
{# The images of the "gallery" area, in the editor's order #}
{% for image in page.getAreaImages('gallery') %}
<img src="{{ image.getResized(800, 600, 'fit').getPath() }}" width="800" height="600" alt="">
{% endfor %}
In the API, the area takes an array of image ids and keeps their order. An area accepts at most 500 ids and each id one time. When you read the record, the area's content has an images list with the id and path of each image, in the same order.
PUT /cdna-api/pages/page/35 HTTP/1.1
Host: docs.coredna.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json
Content-Type: application/json
{
"patchRevision": {
"areaContent(gallery)": [12, 15, 9]
}
}data of a job run's action results when a stored record was deleted later, or when a retrieve action found exactly one record.Was this page helpful?
Your answer goes to the docs team.