What Is This Feature?
Kapost’s integration with Drupal enables you to publish content you create in Kapost directly to Drupal.
- Supported content types: HTML
- Files can be sent to Drupal by implementing the XML-RPC files API, which you can find here.
- Supported versions: Kapost supports Drupal 7 and Drupal 8
- Supported analytics: total page views, click-throughs, inbound links, downloads, Facebook shares
- Kapost uses XML-RPC to interact with Drupal
How It Helps
Drupal is an open-source content management software. It provides a framework for websites, ranging from personal blogs to corporate and government sites. Drupal’s modules and tools enable users to build versatile, structured content for dynamic web experiences.
How It Works
There are many ways you can customize your Kapost-Drupal integration. If the following information doesn’t provide the answers you’re looking for, speak with your Kapost customer success manager.
The quickest way to find the information here is to use ctrl+F on a PC or Command+F on a Mac to search for a key term.
Drupal 7 Publish Options
Sticky: Manage the sticky state of content by creating a drop-down custom field value with the field name set to sticky and two values set to Yes|1 and No|0.
Promote: Manage the promotion state of content by creating a drop-down custom field value with the field name set to promote and with two values set to Yes|1 and No|0.
Path Auto: Customize the alias, or slug, of content in Drupal by:
- Using the path auto module and creating a text custom field with the field name set to kapost_pathauto_alias
- Creating a text custom field with the field name set to kapost_path_alias
Images from HTML content as well as image attachments and custom fields are uploaded into Drupal from Kapost.
When you turned on the Featured Image option in your content settings, you can designate an image attachment or an image within the content as featured by marking it with the yellow star icon that appears when you hover over the image. (This icon also appears on each attachment on content.)
The Featured Image will sync to the designated featured image field that has been mapped in the Kapost Module Settings.
If you don’t want this feature, you can set up an image custom field with the field name set to kapost_featured_image, which will act in the same way.
The Excerpts option in the content settings area sends over the content excerpt and maps it to the standard excerpt in Drupal. It’s not possible to use a custom field in Kapost to override excerpts.
Drupal 7: The default body field with a summary will be present, and the Excerpt will sync as the summary.
Drupal 8: The Excerpt will sync as the summary of the designated body field that has been mapped in your Kapost Module Settings.
Kapost can push SEO information to Drupal when the Metatag(s) Drupal module is installed in your SEO settings.
Drupal 8: The Metatag field must be mapped in the Kapost Module Settings. Navigate to the Kapost Module Settings in Drupal in the Modules tab. Find the Kapost section, and click on the Configure button to manage the settings.
In Kapost, content’s SEO section is below the body of content.
Keep in mind that Meta Keywords and Focus Keywords differ.
- Meta Keywords are a “free form” comma-separated list of keywords, similar to CMS tags.
- Focus Keywords (called Targeted Keywords in the SEO settings) are a predefined list of keywords that can be defined by an admin in the SEO settings.
The CMS Tags field in your content settings expects comma-separated values, and it will push to the built-in Drupal tags taxonomy. Tags will be “synced” to the designated tag field that has been mapped in the Kapost Module Settings.
The CMS Tags field expects comma-separated values, and it will push to the built-in Drupal tags taxonomy.
If you don’t want to use this field, perhaps because it’s free-form, you can use a custom field with the field name set to kapost_custom_tags in its place.
If both this custom field and the CMS Tags are filled in, then their values will be merged together.
If CMS Tags are turned off in settings, the CMS Tags field will not show up on the content page.
When the Use CMS categories option is turned on, CMS categories push to the built-in Drupal categories taxonomy. CMS categories will sync to the designated categories fields that’s mapped in the Kapost Module Settings.
If the Use CMS categories option is turned off, the categories field won’t show up on the content details page.
CMS categories can be synced from Drupal into Kapost in the content settings. This isn’t the default behavior, but it can be set up by an Admin user in the categories section of the content instance settings.
Turning on category syncing will enable Kapost to fetch the categories and populate the multi-select CMS categories in Kapost, based on your Drupal categories. This is a manual process that is triggered when an Admin clicks Fetch Categories in the settings area for the very first sync, and Update Categories for following syncs.
If more than one Drupal connection is synced, then the Categories drop-down menu will display the categories grouped by connection.
- Categories should have unique names. Kapost uses the name of the categories, not the IDs. Therefore, if two categories have the same name, Kapost will only know to set up one connection based on that name.
It’s also possible to auto-add a category on publish, regardless of the select categories on the piece of content. Set this up by turning on the Always publish with category option and then selecting a category. This isn’t the default behavior, but it can be set up by an Admin user in the categories section of the content instance settings.
If you don’t want to use the CMS Categories field, you can add one or more custom fields with the field name set to kapost_custom_category.
- If more than one field exists, then the values will be merged together and used as categories.
- The custom field can be a text, drop-down, or multi-select field. If it’s a text field, then the values are expected to be separated by commas, similar to the CMS Tags field. If both this custom field and the CMS Categories are filled in, then their values will be merged together
Bylining Custom Fields
Kapost’s bylining feature determines the author of the Drupal post based on the assignee of the content.
If not all the assignees on content are Kapost users (e.g., external contributors), then you can override the email of the assignee by creating a custom field called: kapost_author_email.
This custom field can be a text or a drop-down value.
When you make it a drop-down selection, then the bar notation can be used to provide proper “name|email” mapping, which looks like:
John Doe|[email protected]
Mary Jane|[email protected]
Advanced Customization Options
The following advanced customization options are available in the App Center below your Drupal connection username and password field.
SSL: If your Drupal instance has SSL but the certificate is expired or otherwise invalid, then it is possible to disable SSL verification. This should only be done for staging or testing Kapost instances.
Varnish: If your Drupal instance uses Varnish and you can’t exclude the XML-RPC endpoint from being cashed, then it’s possible to turn on the Varnish workaround. This will add a query parameter containing a random timestamp to the XML-RPC endpoint, thus preventing Varnish from caching it.
Gzip: If your Drupal instance has a misconfigured HTTP server, it could Gzip the HTTP response in a way that’s invalid, which Kapost can’t decompress. To address this, disable Gzip compression by turning Gzip off.
Custom Edit URL: If your Drupal instance is set up with a back-end instance and a front-end instance, it’s possible to configure a custom edit URL to use when you construct the URL for the “Edit in Drupal” button.