Another elegant solution is sometimes referred to as a “gypsy rig.”
This is made from two rods, one with a ring at the top bent over at a
angle and the other with a hook at the end.
The hooked rod is placed through the looped rod and when weight is put on the hook it is held in place simply but effectively.
When the rod with the ring is pushed into the ground the rig can be rotated over or away from the fire and the hooked rod can be lengthened or shortened according to need.
Used with a short length of chain like I usually carry in my billy and this is a very effective way of cooking.
In this picture I was working on a concrete fire area in a campsite so a simple hole drilled into a lump of wood gave me a good solid base for cooking over the fire.