Related resources

Resources can be linked by relating them in order to help find and group sets of similar, or mutually relevant resources, not to be confused with Alternative files.

 

How to relate resources

Relate all resources in a collection

  1. Add resources to your selected collection, see Adding to a collection
  2. From the collection actions list select "Relate all resources in this collection"

You will see a confirmation message to say all resources are now related.

While collections are a convenient way to relate a large number of resources, resources are related at the resource level. The relationship is not connected to the collection used.

From version 10.2, the option to "Un-relate all resources in this collection" is also available. This will remove the relationships between the resources in the collection without affecting relationships to resources outside of the collection. 

Manually relate resources

Edit each resource individually and place the IDs of the resources you wish to relate into the "Related Resources" box (See Below).

This relate will only apply to the resource you are editing, you will need to do the same for all of the resources that you wish to relate to each other.

related

Relate on upload

This requires some additional configuration to apply the below option and to set the correct PHP path for you system, often $php_path="/usr/bin";.

$relate_on_upload=true;

Once enabled, you will see a check box option on the upload page which you can select to relate all resources in that upload batch. If using the "Set metadata first" sequence, this option will be at the bottom of the metadata form. If adding the files first, the option will be in the expandable "Upload options" section, below the uploader box.

Viewing related resources

By default related resources appear as thumbnails in a panel located below the resource metadata on the resource view page.

related_resource_standard_view

You'll see a link to "View these resources as a result set" which allows you to see all resources related to your current resource as a set. Enabling the below option below will also include the current resource in that set.
$related_search_show_self=true;
Showing related resources alongside resource metadata
Related resources of specific resource types (e.g. consent forms or product information sheets) can be configured to appear alongside the current resource metadata by adding the resource type id (see Resource Types) to the system configuration variable $related_type_show_with_data.
e.g.
$related_type_show_with_data= array(6);

Showing related resources in a tab

With the above option configured, the related resource can also be set to appear in a metadata tab. The allocated tab for each resource type is defined by the "Tab name" option on the resource type configuration page (Admin->System->Resource types). Edit the type you wish to promote, for example "Consent Form", and select the relevant tab option.
 
Once configured, you will be able to click through to the related Consent Form from its "Title", displayed on the allocated tab in the image metadata. You will also have the option to un-relate the form and to upload other forms which should be related to the image (see below).

To make it easier to upload these important related resources, a link will appear by default in the related resources tab. This will automatically set the appropriate resource type and return the user to the current resource once the upload is completed. The following option can be set to disable this.

$related_type_upload_link = false;

Showing related resources alongside metadata as thumbnails

Instead of the related resource Title showing in the metadata tab, you may choose to show a thumbnail of the resource. To do this, add the resource type identifier to the system configuration variable $related_type_thumbnail_view.

e.g.
$related_type_thumbnail_view = array(6);

For further options on displaying related resources, please see our article on push metadata.

Other ways to add new related resources

It is also possible to create new related resources directly from the resource view page.

  • In standard view, a link 'Create new related resource' is located on the resource view page below any existing related resources. This allows you to create a new empty resource (with no file attached), although depending on system configuration a file for the resource may still be uploaded later.
  • As mentioned earlier, if you have the configuration option $related_type_show_with_data enabled for a resource type, you will also see an 'upload' link on the relevant tab.