craft-preparse-field icon indicating copy to clipboard operation
craft-preparse-field copied to clipboard

Getting ID of field in a Volume Field Layout

Open rogertinch opened this issue 5 years ago • 0 comments

If I'm using the Preparse Field inside of a Field Layout for a Volume, how do I access the ID of the field that is using that Volume? I'm trying to transform an image based on the field that is being used.

So for a heroImage assets field the Preparse Field would use a landscape transform while a portraitImage assets field would use a portrait transform.

Basically, I want the Preparse Field to be reusable across assets fields using the same Volume, but provide different transform sizes depending on the assets field.

rogertinch avatar May 08 '19 22:05 rogertinch