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
{{#if - array() | (optional)}}
- Attributes to be set on the
<img>
tag. - {{#if: array() | Default:
array()
}} - integer
$index
{{#if - 0 | (optional)}}
- Index of the file to use (where 0 is the first file).
- {{#if: 0 | Default:
0
}} - Item
$item
{{#if - null | (optional)}}
- The item that the image belongs to. By default, the current item is used.
- {{#if: null | 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.