Suppose there is a page somewhere in the current tree (not necessarily a direct parent, child or sibling) which has attachments we want to use in the current page. We can combine \{with-page} macros, first searching up the tree, then within that macro search down the tree again, looking for the page. Finally, we provide markup making use of the attachments found.
{code}
Find page labeled 'sponsors' in the current page tree, knowing it is a child of a parent page with the label 'homepage', then render the images attached to the page labeled 'sponsors' in a gallery on the current page:
{with-page:direction=up|label=homepage}
{with-page:direction=down|label=sponsors}
{gallery}
{with-page}
{with-page}
{code}
Which results in:
Find page labeled 'sponsors' in the current page tree, knowing it is a child of a parent page with the label 'homepage', then render the images attached to the page labeled 'sponsors' in a gallery on the current page
{with-page:direction=up|label=homepage}
{with-page:direction=down|label=sponsors}
{gallery}
{with-page}
{with-page}
|