Installing and upgrading
Backups
Security
User management
Advanced user group options
Customising ResourceSpace
Plugins
StaticSync
Configuring ResourceSpace
Integrations

Drupal integration

Selected resources in ResourceSpace can be synchronised automatically with the media library in Drupal 11. Resources are added and removed as they become available, or are deleted/hidden from the ResourceSpace user.

Installation

1. Create the Drupal user in ResourceSpace

Create a user (for example with username "drupal") that will have access only to the resources you want to synchronise. Consider using a search filter to restrict access to assets, for example where a metadata field such as "publish to web" has been set to "yes", or alternatively use permissions to limit access based on a workflow status.

IMPORTANT - ensure access is appropriately limited otherwise all assets the user has access to will be copied to your Drupal media library!

Make a note of the API key which is shown when editing the user's details.

2. Install the plugin 

Download the plugin and unzip it to /modules/custom/ within your Drupal installation's files on disk. Create the "custom" folder if it doesn't already exist. The path should be /modules/custom/resourcespace_integration/ with the folders "src", "templates", etc. direct subfolders of that folder.

In the Drupal admin interface go to Manage, then Extend. Scroll down to Custom and check the box next to  ResourceSpace Integration, then click Save.

3. Configure the plugin

Go to Manage, then Configuration and scroll down to ResourceSpace Settings under Web Services.

Drupal configuration

Enter the URL of your system with "/api" added, as with the example above. Enter the username and API key of the ResourceSpace drupal user created earlier.

By default a new Cron task will be created within Drupal that will synchronise resources in the media library with those in ResourceSpace periodically. However the "Enable Media Filter" option means Drupal will search for additional resources when the user is searching the media library and synchronise those too. This can be useful if resources have just been added as they will then be searchable on Drupal immediately without having to wait for the next automated Cron syncronisation.

4. Run Cron manually to test synchonisation

In Drupal go to Manage, Configuration then Cron. Click "Run Cron" to synchronise resources, which will then appear in the media library. Note that synchronised resources will be automatically removed from the media library if they are no longer available to the configured ResourceSpace user.

Search the media library (Mange, Content, Media) and verify that the ResourceSpace resources are now available in Drupal.