Pass search query to imagethumbnail

When a user searches for an item, I want the pagination links to navigate only through the items with this specific search criteria.
I found this:
it works very well with the title of the item in the search results.

Next step is to do the same thing with the shown thumbnails of the item. (so when you click on the thumbnail, the link to the item is /items/show/###?query=searchquery)
I just can’t figure out how to do this. It’s probably very easy, but I’m a newbie at php-development and omeka.

Thanks in advance for the help! :slight_smile:

Found it! Did not know about the record_image() function.


$recordImage = record_image($recordType, 'square_thumbnail')): ?
$searchlink = record_url($record, 'show').'?' . $_SERVER['QUERY_STRING'];
<a href="<?php echo $searchlink; ?>"><?php echo $recordImage?></a>