Item thumbnail image is not being found on index page

Hi,

On the items/browse page of my Omeka site I can just loop items directly.

foreach (loop('items') as $item):

On the index page of my Omeka site I have to first get the items:

$items = get_records('Item',[], 1000);   
set_loop_records('items', $items);
foreach (loop('items') as $item): 

I’m not entirely sure why I have to use get_records on my index page to get the items but not on the items/browse page where the ‘items’ element is set up and ready to go. I assume there is somewhere in the code that pre-enables these loop variables, if anyone can shed any light on that for me that’d be great.

Thanks.

The items variable on an items browse page represents the items that should be visible on that page, according to whatever search/browse terms the user provided, the page limit, etc.

That only applies on the items browse page, though. There are no “correct” items to show on any other page, so if you’re trying to load specific items on the index or elsewhere, you have to load them yourself.