Skip to main content

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

info

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:

  1. Through a configuration override (e.g. settings.php or environment variable). To alter it, update the environment variable or override the settings.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";
  1. In Drupal, go to ConfigurationWeb servicesEduframeEduframe Settings and insert the access token in the field called Access token.
warning

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 ConfigurationWeb servicesEduframeEduframe 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/
warning

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:

  1. Navigate to ConfigurationSearch and metadataURL aliasesPatterns
  2. Add a new pattern for the entity type Catalog Product
  3. 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.

  1. Enable the pattern
  2. Go to the Bulk generate tab, select Catalog Product as the type, and choose Regenerate URL aliases for all paths
  3. Click Update to apply the new pattern
info

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.

tip

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: