Description
item_square_thumbnail()
returns HTML for a square thumbnail image associated with an item. Default parameters will use the first image, but that can be changed by modifying $index.
Usage
<?php echo item_square_thumbnail($props = array(),$index = 0, $item = null); ?>
Arguments
- Params - An array of parameters. Available parameters include:
- $props: A set of attributes (properties).
- $index (integer): The position of the file to use (starting with 0 for the first file). Default is 0;
- $item: The item to which the image belongs. A null value sets the items to the current item.
Return Values
- The value of item_image as an HTML string.
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(item_square_thumbnail()) { echo item_square_thumbnail(); } ?>
Source File
- /applications/helpers/ItemFunction.php in Omeka 1.0.