Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flesh out the README #21

Merged
merged 13 commits into from
Apr 30, 2024
29 changes: 27 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@

## Introduction

A module to facilitate image discovery for Islandora repository items.
A module to facilitate image discovery for Islandora repository items. Image discovery looks for images in the following places and will use (and cache) the first one found:

* contents of a Media field, `field_representative_image` on the node
* an "Islandora thumbnail", i.e., a media that is "Media of" the node (using `field_media_of`) with a Media Use (`field_media_use`) taxonomy term with External URI (`field_external_uri`) equal to "http://pcdm.org/use#ThumbnailImage"
* a first child's Islandora thumbnail media, i.e. the Islandora thumbnail of the node with lowest weight (`field_weight`) that is a Member Of (`field_member_of`) the node in question. If not found on the first direct child, it will look at the first child's first child, and so forth to a depth of 3.


## Requirements

Expand All @@ -18,14 +23,34 @@ further information.

## Usage

This module allow for image discovery on parent aggregate objects such as
This module allows for image discovery on parent aggregate objects such as
collections, compounds and paged objects.

## Configuration

### Adding a "Representative Image" field to your content type

To override the use of the "Islandora" thumbnail, you can add a new field to each of your applicable content types. To do this:

1. In the "Manage fields" page for your content type, choose "Create a new field".
1. In the "Add a new field" list, choose "Media" (if on Drupal < 10.2, this is "Reference > Media")
1. Set the new field's label to "Representative image" so that the machine name of this field is `field_representative_image`. This machine name must be set; you can change the label later if you wish.
1. On the next page, in the "Type of item to reference" setting, choose "Media" and leave the "Allowed number of values" at 1.
1. On the next page, in the "Media type" checkboxes, choose "Image".
1. Click on "Save settings".

If you are adding the field to more than one content type, you should choose "Re-use an existing field" on subsequent content types.

### Using the image in Views

When configuring a content view, add and configure the virtual field
"DGI Image Discovery Discovered Image".

### Using the image in Content Display

Under "Manage display" for a content type, you can enable the pseudo-field
"DGI Image Discovery Discovered Image".

## Troubleshooting/Issues

Having problems or solved a problem? Contact
Expand Down
Loading