set_current_item
allows you to set a particular item as the current item, so you can later use any available item helpers for that particular item.
Usage
<?php set_current_item($item); ?>
Arguments
- item - An item object, which can be retrieved through a variety of methods. See get_item_by_id for one such method.
Examples
The following example sets the current item to an item with a ID of 12:
<?php set_current_item(get_item_by_id(12)); ?>
After setting the current item, you can use the item, or other item helpers, to get item metadata. The following example sets the current item as described before, then uses the item
helper to echo the Title and Description of that particular item:
<?php set_current_item(get_item_by_id(12)); ?> <h2><?php echo item('Dublin Core', 'Title'); ?></h2> <div id="item-description"><?php echo item('Dublin Core', 'Description'); ?></div>