This page is outdated
The information on this page concerns an old or obsolete version of Omeka. If you are using a more recent version, instead see recent_items on Read the Docs.
Description
recent_items
returns an array of Item objects recently added to your Omeka archive.
Usage
<?php recent_items($num); ?>
Arguments
- $num: Integer. Default value is 10.
Examples
Getting 20 Recent Items
The following will return an array of the last 20 recent items, which can then be used in a loop:
<?php $items = recent_items(20); ?>
Creating a Loop of Recent Items
The following example uses recent_items
in a loop, and will echo the title for each item:
<?php $items = recent_items(20); set_items_for_loop($items); while(loop_items()): echo '<h2>'.item('Dublin Core', 'Title').'</h2>'; endwhile; ?>