Well, you’re correct that the file to mess with is likely CollectionTreeList.php (when I replace it with simple html, it displays properly). Interestingly, if on that page I replace only the following line with plain html…:
$html .= $this->collectionTreeList($collection['children'], $linkToCollectionShow);
…the main Browse Projects page (http://michaelsand.com/archives/collection-tree) still displays the text links for both parent and child collections, in addition to the plain html insert (“It works”). However, on individual Collection show pages (e.g. http://michaelsand.com/archives/collections/show/12), it completely replaces the text link to the child collections that display at the bottom of that page. Not a deal-breaker, but they’re connected.
So, if I can figure how to call any image within each child collection, I should be able to get there. The
get_record('Item', array('collection_id' => $collectionId)); bit doesn’t seem to do it, regardless of where I place it.
That original line —
$html .= $this->collectionTreeList($collection['children'], $linkToCollectionShow); — appears to be the nested link I want to add the image to (as I said, if I comment it out, everything still displays correctly on the main Browse Projects page, though disappears from the bottom of the individual collections show page).
No amount of manipulation of that line, though (adding the suggested
get_record query, replacing it, etc) seems to work, though. It either breaks the page all together, or simply doesn’t change the display (other than removing the links on the collections show page, which I care less about).
Separately, the following code in /archives/applications/views/scripts/collections/show.php correctly displays a representative thumbnail (most recently added, I believe) for child collections show pages (e.g. http://michaelsand.com/archives/collections/show/15):
<?php if ($collectionImage = record_image($collection, 'square_thumbnail')): ?>
<?php echo link_to($this->collection, 'show', $collectionImage, array('class' => 'image')); ?>
<?php endif; ?>
<?php if ($description): ?>
So I’ve been playing with trying to insert/tweak that code into CollectionTreeList.php, to no avail.
Thanks so much for the help! I know this is doable…