Functions/item_fullsize

item_fullsize() returns HTML for a fullsize image associated with an item. By default, the first image will be used, but other images can be displayed by passing $index.

Usage

<?php echo item_fullsize($props = array(),$index = 0, $item = null); ?>

Arguments

array $props (optional)
Attributes to be set on the <img> tag.
Default: array()
integer $index (optional)
Index of the file to use (where 0 is the first file).
Default: 0
Item $item (optional)
The item that the image belongs to. By default, the current item is used.
Default: null

Examples

The following example works on the items/show.php page. Not all items have an image associated with them, so it is best to check.

<?php 
if(($fullsizeHtml = item_fullsize())) {
    echo $fullsizeHtml; 
}
?>

Source File/Version

  • application/helpers/ItemFunctions.php since Omeka 1.0.