Hello there, and please forgive me for being a complete and utter newbie with Omeka. I'm afraid I've only used it for two days, and I'm having a little issue I can't solve.
The problem is that we need to have a "recent items" list in a sidebar, and I've got some code (which I've put into the header.php file) that appears to work correctly for generating the list.
Unfortunately, though, that code also prevents the show.php from working properly. What happens is that items with the URL /items/show/2 show the correct information in the page header and in the citation, but all the rest of the information comes from the first item (/items/show/1). If I take that code out of the header.php file the show.php files work correctly. I hope that makes sense ...
The code I was using is reproduced below. If anyone can give me a little insight into what the problem might be, I'd much appreciate it.
I'me developing my own custom theme, by the way, but at the moment the only template files I've modified have been header.php and footer.php,as well as the main CSS file. The show.php file is unchanged from the default template.
Thanks in advance for any help people may be able to give.
<!-- Recent Items --> <div id="recent-items"> <h2>Recently Added Items</h2> <?php set_items_for_loop(recent_items(10)); ?> <?php if (has_items_for_loop()): ?> <ul> <?php while (loop_items()): ?> <li><?php echo link_to_item(); ?></li> <?php endwhile; ?> </ul> <?php else: ?> <p>No recent items available.</p> <?php endif; ?> </div><!-- end recent-items -->