Trying to grab a random attachment from a photo gallery page - located on a child page, uses the gallery macro - and it's child-pages (the sub-albums).
First, I'd love to know if there's a better way for managing a photo gallery in Confluence.
Second, and my main question, how do I do this? I found a code example using the report-image macro but can't get it to work:
- Home page
- - W page (this is the page I want to display a random image on)
- - - X page (page containing various content, DON'T WANT to get anything from this)
- - - A page (this is a gallery page, may get a random photo/attachment from here)
- - - - B page (sub/child-page of A, could also get random photo from here)
- - - - C page (as 
- - - - D page (as 
- - - Y page (another page, don't want to get anything here!)
- - - Z page (as Y)
In short, get random image (attachment) from A, B, C, or D and display on W - but don't get anything from X Y Z or anywhere else in the space.
TIA!