Open alexroper opened 4 years ago
No, you're right, the matrix field handle syntax only works inside the elements functionality. Supporting it in the general fields functionality was a bit tricky, so I dropped it initially. But I'll leave this open and revisit it down the line.
FWIW, if you drop the criteria in an elements definition, it'll do the same thing. But you'll have to define it for each element type of course.
Thanks. I thought that's how it worked but just wanted to make sure I wasn't missing something.
I realized this wouldn't be too painful if I just combine several sections in the element criteria. Didn't occur to me I could do that at first.
return [
'elements' => [
[
'elementType' => \craft\elements\Entry::class,
'criteria' => [
'section' => ['news', 'about', 'blog', 'contact'],
],
'fields' => ['pageContent:image.image'],
'transforms' => ['imageBlock']
],
]
];
Is it possible to target an image inside of a super-table field in the same way that you can for a matrix field?
<matrixFieldHandle>:<matrixTypeHandle>.<fieldHandle>
@daniellelecomte I don't think so. My experiments with targeting image transforms inside a Super Table field haven't worked at all. But maybe I'm doing something wrong. ¯\_(ツ)_/¯
@daniellelecomte It's not at the moment, but shouldn't be too difficult to add. File a separate FR if you want me to look into it.
I'm submitting a...
Description
Is it possible to target an image handle inside a specific matrix field for auto transform generation? Can I do this without targeting all fields with the same handles?
Say I have a matrix field named
content
with a block type namedcarousel
and a field inside that with the handle ofimage
.This seems to work:
But this doesn't:
The format that uses
<matrixFieldHandle>:<matrixTypeHandle>.<fieldHandle>
only seems to work with elements.Is this working correctly or am I doing something wrong?
Additional info