Random Items Block

By BibLibre A page block layout to display random items
Download 0.2.0

Random Items Block

This Omeka S module adds a page block layout that displays random items. The number of items is configurable.

Installation

See Installing modules

Using the cache

Getting a random list of items can take a significant amount of time on large databases. To avoid slowing down the page too much, the list of items is put into a cache for 60 minutes, so the list of items will change at most once per hour.

The cache used is APC User Cache. If you encounter performance issues, make sure it is enabled.

If you do not want to use the cache you can disable APC User Cache. Alternatively you can use the view helper directly in your theme:

echo $this->getRandomItems($count = 3, $useCache = false);

Caveats

  • To avoid checking user permissions, only public items are displayed, even if the logged in user is a Global Administrator
Version Released Minimum Omeka version
0.2.0September 20, 2021 [info]^3.0.0
0.1.0September 20, 2021 [info]^2.0.0