FR: Make asset custom fields unique to an entry #8509
Replies: 4 comments
-
In lieu of this, you can create a Matrix field with one block type, with an Assets field (limited to one selection) and whatever other custom fields you need to be associated with each asset. Then each block ends up representing a relation, but also contains the entry-specific relation data you’re after. |
Beta Was this translation helpful? Give feedback.
-
That’s a reasonable approach. Personally I think the asset custom fields are a really useful and powerful addition to craft’s flexibility but in its current form it can mean that content authors can inadvertently reference an image in an entry (that has already been used for a different entry) and update its custom fields without realising the implications. |
Beta Was this translation helpful? Give feedback.
-
Agree your idea could provide a better AX. |
Beta Was this translation helpful? Give feedback.
-
My suggestion for a universal solution:
|
Beta Was this translation helpful? Give feedback.
-
Description
Assets can have their own custom fields - for example you can create a plain text field to hold the image caption. In this case the text entered into the image caption would be accessible in any entry the image was referenced from. It would be great if the data included in the asset’s custom fields could be unique on an individual entry basis. A specific use case is having custom asset fields for hero images that could specify text overlay position, alignment, theme, etc. While these fields could be added to the entry form itself it would make sense to associate them with the image as in the abscence of an image they may not be relevant. Allowing the data contained within these custom asset fields to be unique to each entry would mean you could use the same image across multiple entries with different values applied.
Beta Was this translation helpful? Give feedback.
All reactions