markus_blue_tomato Posted March 15, 2020 Share Posted March 15, 2020 How can I get from an image field all custom image fields dynamically? E.g. $page->image->alt and $page->image->credits but how can I get this fields like $page->image->getCustomImagesFields or $page->image->getCustomImagesFieldsTemplate (where I can use the $template API methods $template->fields... Link to comment Share on other sites More sharing options...
markus_blue_tomato Posted March 15, 2020 Author Share Posted March 15, 2020 Ah - after describing the problem I found the solution quick I'll check if there is a template with "field-" and current image field name. $customImageFieldTemplate = wire('templates')->get("field-$fieldName"); After this I can iterate over $customImageFieldTemplate->fields 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now