Configuring the Drupal Module

Modified on Mon, 08 Jan 2024 at 11:13 AM

Once you have set up your Drupal integration with your Contently account, the next step is to continue the installation on Drupal. Below are the instructions you or someone on your team will need to continue the installation.

 

In this article we will review:

  1. API key

  2. Installing the Contently module on Drupal

  3. Customizing your publishing settings

  4. Customizing your mapping configuration

  5. Locale and metatag modules 

  6. Plugin updates

  7. Testing your integration

1. API Key 

You should have received your API key by email. This API key is also available in your publication settings in Contently. If you did not receive an API key, please make sure you followed these instructions to create a Drupal integration.

 

This API key is unique to the integration you created and can only be used with one instance of Drupal. If you need to publish to multiple Drupal instances, you will need to create a second Drupal integration to receive a second API key from Contently.

 


 

2. Install the Contently module on Drupal

Note: To follow the steps in this section, you will need admin privileges in Drupal.

 

1. Contently has modules for Drupal 7, Drupal 8, and Drupal 9. Download the correct Contently module.


Download the Contently module for Drupal 7 here.
Download the Contently module for Drupal 8 here.
Download the Contently module for Drupal 9 here

 

2. Log into Drupal, click the "Extend" tab in the top navigation, and click the "Install new module" button. 

 

3. Upload the zip folder that you downloaded in step 1 and click the "Install" button.

 

4.  After the module is installed, a success message will appear. Click the "set your API key" link to continue. 

 

5. To connect Drupal to Contently, enter your API key and click "Save configuration." 

 

6. After you click "Save configuration," a Contently webhook URL will appear below your API key. This will be your indication that you have successfully connected Drupal to Contently. This webhook URL is tied to this API key and should not be shared or posted anywhere. 

 

Note: To find the API key for your integration in the future, log into Contently and navigate to the Integrations page in Publication Settings. Expand the details for your Drupal integration to view the API key. 

 

3. Customizing your publishing settings

Note: The steps in this section should be completed by someone who is familiar with your content types in Drupal and your content publishing preferences. You will also need "Administer Contently settings" privileges in Drupal. All Administrator accounts will have this permission turned on by default. 

 

1. If you have just completed the steps above to install the Contently module and are already on the API tab in Drupal, click the "Settings" tab to configure your publishing settings. You can find this page again by clicking "Configuration" in the top navigation in Drupal and clicking on the Contently link in the "Web Services" section on the page. 

 

2. Drupal has a variety of different content types to choose from. Choose whether you would like to map all of your Contently story types to one specific Drupal content type or if you want to set up a mapping for each of your different content types in Drupal. If you want to create the same content type every time you push content from Contently to Drupal, choose the first option in the "Content type mapping" section (and continue to step 3 below). If you want to push content from Contently to more than one of your content types—or templates—in Drupal, choose the second option in the "Content type mapping" section and continue to step 4 below.

 

3. If you are mapping all Contently content to one content type in Drupal, select which content type you want to use. Drupal will create this content type every time you push content from Contently to Drupal. Continue to step 5 below.

 

4. If you are mapping Contently content to a variety of different content types in Drupal, select which Contently story format to map to each Drupal content type that you want to use in the list.  

 

5. Choose which publishing options you want to use. We recommend pushing all content to Drupal as a draft so that you can view your content in Drupal before publishing it live. 

 

6. If you want to push videos from Contently to Drupal, make sure to choose the "Full HTML" option in the "Default text format" section. If you have videos embedded in your Contently content, this option will make sure that the iframes show up correctly when you push your completed content to Drupal. Please note that the Contently module does not offer support for specific video plugins.

 

7. Finish filling in the rest of your settings on the page. After you customize your settings, make sure to click the "Save configuration" button at the bottom of the page.

 

4. Customizing your mapping configuration

Note: The steps in this section should be completed by someone who is familiar with your content types in Drupal and your fields in Contently. You will also need 'Administer Contently settings' privileges in Drupal. All Administrator accounts will have the permission turned on by default. Please keep in mind that the mappings you create in this section will apply to all of the Contently publications that share this integration. More information is available at the bottom of this section. 

 

When you push content from Contently to Drupal, Contently will automatically insert the right details into your Drupal page. Configure your mapping so that Contently knows which fields from Contently match to each field in your Drupal content type.

 

1. If you have just completed the steps above to customize your publishing settings, simply click the "Mapping" tab and then the "Configure mapping" link to customize your settings. You can find this page again by clicking "Configuration" in the top navigation in Drupal and clicking on the Contently link in the "Web Services" section on the page.  

 

2. Configure your mapping by choosing which Contently field should map to each Drupal field in the list. You are required to configure a mapping for the Drupal title field. All other fields are optional.

 

3. Click "Save configuration" at the bottom of the page to save the mapping. If you followed step 4 in the above section, make sure to click "Configure mapping" for each Drupal content type in the list that you want to push Contently content to.  

 

NOTE ABOUT MULTIPLE PUBLICATIONS: The mapping(s) you created above are tied to your integration / API Key. If you share your integration across multiple Contently publications, each publication will use the same mappings when you push content to Drupal. This works well if your publications typically use the same tags and custom fields. 

 

5. Locale and Metatag Modules 

Contently provides limited support for two common Drupal modules: Locale and Metatag. The Contently module will automatically detect if either of these modules is activated so that you can include these fields in your mapping. 

 

Please understand that some features of these modules might not be supported. We cannot guarantee support for future updates to these two modules.

 

IP Allowlist + Webhook Instructions

If your CMS runs on your closed network—or if you use a Web Application Firewall to restrict POST requests to your CMS—you will need to allowlist four IP addresses so that Contently's API can access your CMS. Here are the IP addresses your IT team will need:

 

52.20.250.136
52.71.91.52
34.198.64.198
34.198.174.116

To check which URL Contently is pushing to in your network, visit the Integrations page in your Publication settings in Contently. Expand the details for your integration in the list. The webhook URL your integration is pushing to will be listed at the bottom of the details section. The Drupal module sets this webhook for you automatically.

 

If for some reason your IT team needs to edit this webhook URL, click the edit button next to your integration. Do not forget to click 'Save' on the edit form once you have changed your webhook URL. We only suggest editing this URL in specific circumstances. One example is if your IT team needs to add credentials to the webhook or change the URL to point to a production environment after testing in staging. Please do not change this webhook URL unless necessary.

 

6. Plugin Updates

1. To check for updates to the Contently module, click Drupal's "Extend" tab in the top navigation and click the "available updates" link near the top of the page.

 

2. When an update is available, Contently will appear in the list on the "Update" tab. Check the box next to the Contently module and click the "Download these updates" button to download the module.  

 

3. Once the module successfully downloads, click the "Continue" button. 

 

4. On the following page, click "Continue" to install the new module on your server. Your FTP username and password should already be filled in for you.

 

5. The next page will say "Update was completed successfully." This will be your indication that you have updated your Contently module to the newest version.

 

7. Testing Your Integration

If you ever need to test the connection between Contently and Drupal, you can log into Contently and navigate to the Integrations page in your Publication settings. Expand the details for your integration and click the "Test" button. If you haven't used this button before, your status will say "Unverified." 

 

If your status changes to "Connected" then you're all set. When you view your content list in Drupal, you will notice a new draft post called 'CMS Test Story' by Jane Doe. Feel free to delete this story. Each time you push the 'Test' button in Contently, we will either update the existing post if it still exists in Drupal or create a new one in order to test the connection between the two platforms.

 

If your status changes to "Disconnected" please make sure you entered the correct API key into Drupal. If you have more than one Drupal integration, make sure you are viewing the correct integration in Contently. If your status changes to "Disconnected," you will receive an email with more information to help your IT team diagnose the issue.

 

Note: If the status says "Installation Required" that means your API key has not been entered into Drupal yet. The "Test" button will be disabled. Please make sure to follow the installation instructions at the top of this page.

References

For more information about installing and using modules in Drupal 7, click here.
For more information about installing and using modules in Drupal 8, click here.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article