Alane
1
In the SolrSearch plugin, the results page uses this code to display all of a record’s files in a gallery format:
<?php $item = get_db()->getTable($doc->model)->find($doc->modelid);
echo item_image_gallery(
array('wrapper' => array('class' => 'gallery')),
'square_thumbnail',
false,
$item); ?>
Is there a simple way to display only the record’s first file and link it to the record, rather than the file itself?
kloor
2
This should do what you want:
<?php
$item = get_db()->getTable($doc->model)->find($doc->modelid);
echo link_to($item, 'show', item_image('square_thumbnail', array(), 0, $item));
?>
See the documentation for other helper functions that may be of use:
https://omeka.readthedocs.io/en/latest/Reference/packages/Function/View/index.html
Alane
3
Perfect! Thank you, @kloor.
system
Closed
4
This topic was automatically closed after 250 days. New replies are no longer allowed.