-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Target an image handle for auto generation only inside a matrix #39
Comments
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? |
@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
The text was updated successfully, but these errors were encountered: