Installation
This is a Drupal module for integrating Eduframe courses and programs into your Drupal website. The Drupal module will be released as a contributed module soon. Until then, you can contact support@drieam.nl to obtain an early version of the module.
Install using Composer
This section will be filled once the module is available on Drupal.org.
Install using ZIP
The module requires one dependency which can be installed as follows:
# You require at least version 2.0.0
composer require drieam/eduframe-php-client
Next, add the module to modules/custom/eduframe/ using the ZIP file obtained from our support team. Make sure to enable the module as well (either through the UI or through the command line).
Setup the access token
The access token can be setup in 2 different ways:
- Through a configuration override (e.g.
settings.phpor environment variable). To alter it, update the environment variable or override thesettings.php:
// Allow reading the token from your environment
$config['eduframe.settings']['access_token'] = getenv('EDUFRAME_ACCESS_TOKEN');
// Directly set the access token
$config['eduframe.settings']['access_token'] = "EDUFRAME_ACCESS_TOKEN";
- In Drupal, go to Configuration → Web services → Eduframe → Eduframe Settings and insert the access token in the field called Access token.
If both are configured, the configuration override in settings.php takes priority.
You can follow these steps to create an API key in Eduframe.
The Drupal module requires the following scopes:
courses:read(Required for products, variants)settings:read(Required for labels, course_locations, course_variants)
Next, go to Configuration → Web services → Eduframe → Eduframe Settings. Fill in the Eduframe static assets path field with the URL to your Eduframe environment. Replace drupal-dev with your educator slug:
https://drupal-dev.eduframe.nl/
The module automatically loads category and product avatars that are configured in Eduframe. These images are loaded through the URL above. In case your system cannot import these images, double check the configured link above.
Setup custom URLs for products
Eduframe automatically generates unique slug fields for each product created in Eduframe. These slugs remain consistent even when products are updated and are also used in signup URLs.
To configure custom URL patterns for products:
- Navigate to Configuration → Search and metadata → URL aliases → Patterns
- Add a new pattern for the entity type Catalog Product
- In the Path pattern field, specify your desired URL structure using the slug field:
/courses/[eduframe_catalog_product:slug:value]
You can customize the path prefix (e.g., /courses/, /products/) according to your needs.
- Enable the pattern
- Go to the Bulk generate tab, select Catalog Product as the type, and choose Regenerate URL aliases for all paths
- Click Update to apply the new pattern
Eduframe auto-generates unique, immutable slugs for each product. These slugs are used consistently across your website URLs and in signup links obtained from Eduframe.
Slugs ensure that the same product from Eduframe is always available on the same URL on your website. This helps with SEO and allows links that are shared to stay consistent even after performing a full reset in the synchronization panel.
Next steps
The content of the module is still empty after completing the installation. You will need to do 2 more things: