If a subscribing website in your Content Hub subscription contains entities with a different data structure than your publishing website, you may need to customize your shared content as it moves in and out of your publishing website. Content Hub includes hooks that allow you to customize shared content before publication on a subscribing website, or to strip out customizations before submitting content back to the publishing website.
You can use the available hooks to improve content syndication by modifying either your website’s Common Data Format (CDF) or your entity’s data structure to match your subscribing or publishing website’s individual needs.
Select from the following hooks, based on your installed Drupal version, to modify your website’s CDF in these methods:
hook_acquia_contenthub_cdf_from_drupal_alter
hook_content_hub_connector_cdf_from_drupal_alter
hook_acquia_contenthub_cdf_from_hub_alter
hook_content_hub_connector_cdf_from_hub_alter
Select from the following hooks, based on your installed Drupal version, to modify your entity’s data structure in these available methods:
hook_acquia_contenthub_drupal_from_cdf_alter
hook_content_hub_connector_drupal_from_cdf_alter
hook_acquia_contenthub_drupal_to_cdf_alter
hook_content_hub_connector_drupal_to_cdf_alter
Code examples for these hooks can be found in the module’s API file, depending on the version of Drupal in use:
Drupal 9: acquia_contenthub.api.php
This file is applicable only for Content Hub 8.x-1.x. For Content Hub 8.x-2.x, see Understanding Content Hub events.