The Content Marketing Platform (CMP) has native support for Drupal versions 7 and 8. This topic describes setting up your Drupal site for integration with CMP.
Integrate a Drupal site
- Go to your avatar and select Integrations.
- Open the Website, CMS & Feeds tab.
- Select Add > Drupal.
- Enter the Name, Public URL, and select the Website Type.
- Click Save to integrate your website with the CMP.
You need a feed channel where you publish content and then have the content ingested into your Drupal site.
Integrate with Drupal 8
- To use Drupal 8, download and install newscred-8.tar.gz.
- Enable the module from the list of modules.
After you install and enable the module, there are multiple ways to ingest the feed from the CMP. You can fetch it programmatically in your theme with a custom module or use the default Feeds Module.
- Install the following modules from https://www.drupal.org/project/feeds and enable Feeds only because the rest are automatically enabled.
- Feeds – https://www.drupal.org/project/feeds
- Feeds JSONPath Parser – https://www.drupal.org/project/feeds_jsonpath_parser
- CTools – https://www.drupal.org/project/ctools
- Job Scheduler – https://www.drupal.org/project/job_scheduler
- Click Structure and select Feed Types.
- Click Add Feed Type and fill in the fields as shown.
- Enter the mapping. You can add fields based on how you want the content to display on your website.
- Click Save to move on to ingesting a feed.
- Copy the JSON/ATOM API link, which is exposed when you click Export Feed, and add that link to the Drupal site. CMP displays the link.
- Click Content, click Feeds, and click Add Feed.
- Add a Title of your choice, paste it in the ATOM Feed URL, and click Save and Import. The articles are automatically ingested and published.
Integrate with Drupal 7
- To use Drupal 7, install newscred-7.tar.gz.
- Enable the module.
After you install and enable the module, there are multiple ways to ingest the feed from the CMP. You can fetch it programmatically within your theme with a custom module or use the default Feeds Module.
- Install the following modules and enable Feeds only; the rest should be automatically enabled.
- Feeds – https://www.drupal.org/project/feeds
- Feeds JSONPath Parser – https://www.drupal.org/project/feeds_jsonpath_parser
- CTools – https://www.drupal.org/project/ctools
- Job Scheduler – https://www.drupal.org/project/job_scheduler
- Configure your Importer to match CMP Feed attributes.
- Go to Structure > Feed Importers.
- Click Add importer.
- Add your desired basic settings.
- Configure node settings.
- Create a mapper that introduces fields onto your Drupal database.
- Configure your parser to map feed attributes with the fields you created above.
- Click Save to create the importer.
- Go to Structure > Feed Importers.
- Select Import importer, paste the file contents in the text area, and click Save. (You can leave other fields blank.)
- Copy the JSON/ATOM API link, which is exposed when you click Export Feed, and add that link to the Drupal site.
- Click Add Content of type Article.
- Find the input field to enter the Feed URL. Paste in the JSON Feed URL and click Save. The articles are automatically ingested and published.
Please sign in to leave a comment.