I'm learning to write my own modules, so there's a lot that I still don't know. I have looked at other modules/plugins, videos, but I arrived at a dead end.
I'm writing a module that generates formatted, responsive html tags. The module sets a function that can be invoked from within a template --this is working already. The main arguments it takes are the entry object (entry
), the image field handle (fieldHandle
) that needs to be queried, and the desired image transforms (transforms
array) that are required.
With that I want to obtain the image loaded to the field, and access the urls of the transforms.
I was able to get this to work on a macro, but I'm having a hard time with how to do the same from within a module.
If anyone has an example or suggestions it would be really appreciated.
Thank you
NOTE: just in case, I'm not interested in assets bundles associated with the module. I'm trying to query an asset from a entry uploaded though the back end.