Hey corb,
I think you’d be better off using ditto for this. And here’s how:
1. Create an image TV called ’page-thumb’
2. In each document, choose your image for the page
3. Create a chunk for your ditto tpl called ’image-menu’
4. For your ditto tpl, put something like this:
<a href=[~[+id+]~] title=[+pagetitle+]><img src="[(site_url)][+page-thumb+]" /> [+pagetitle+]</a>
[~[+id+]~] - creates the link to that page
[+pagetitle+] - is the page title
[+page-thumb+] - is the value of the image you created.
[(site_url)] - is the http://.... of your site (I add it just to be safe)
Ditto just aggregates documents. The simplest call just includes `parents` and `tpl` like:
[[Ditto? &parents=`0` &tpl=`image-menu`]]
One other thing to remember, when creating your ditto template chunks, all tvs use [+pagetitle+] syntax instead of [*pagetitle*]