In Drupal 8 seems one has to create 2 or 3 files plus folder structures to do even the simplest of tasks. So I am trying to figure out how to do a simple hack without all the overhead.
I have a node type for which I attached images. There is a parent node for which I want to display one of the images from the children. I created an Image field for the parent.
So literally, all I need to do is query the database, grab a child's image at random (in every view, each time the parent is viewed, I want the image re-assigned randomly), and rewrite the parent's image field accordingly. This was so easy in Drupal 7...
Does anyone have an idea of how to do this in Drupal 8 in the simplest possible manner, ideally editing just one file?
Thanks!