The functionality of publishing content to Drupal is provided through an Enterprise Server plug-in.
This article describes how to integrate Drupal 6 in Enterprise to make it possible to publish from Enterprise to a Web environment based on Drupal 6.
Note: For other versions of Drupal, see: |
Step 2. Installing the Enterprise module in Drupal
Step 3. Enabling Drupal modules
Step 4. (Optional) Updating the database
Step 5. Creating a user for publishing to Drupal
Step 6. Mapping Issues to content types
Step 7. (Optional) Creating vocabularies and terms
Step 8. Enabling file upload attachments
Step 9. Enabling image attachments
Step 10. Configuring the Drupal config file
Step 11. Enabling the Drupal 6 Server plug-in
Step 12. Testing Enterprise Server
Step 13. Configuring Publication Channels
Step 1. Setting up Drupal
Set up a default installation of Drupal by following the instructions as outlined on www.drupal.org:
Step 2. Installing the Enterprise module in Drupal
The Enterprise module allows Drupal to communicate with Enterprise Server.
Step 2a. Unzip the DrupalEnterprise_9.x.x_Buildx.zip file that is provided with the Enterprise Server installation.
A folder named ww_enterprise is created.
Step 2b. Copy the ww_enterprise folder to the following location:
<drupal directory>/sites/all/modules/
Note: If the directory is not available yet, create the directory.
Step 3. Enabling Drupal modules
The Enterprise module that was installed in step 2 needs to be enabled, as well as other modules on which it is dependent.
Enable the following modules:
- taxonomy
- upload
- image
Note: If the image module is not available, download it from http://drupal.org/project/image.
- image_attach
Note: This is the same module as image, but needs to be enabled separately.
- WoodWing Enterprise
Step 4. (Optional) Updating the database
Note: This step only has to be followed when updating Enterprise Server from a previous version.
Run the following page in a Web browser:
<Drupal URL>/update.php
Note: Replace <Drupal URL> by the URL of your Drupal installation. For example: http://localhost/drupal/update.php |
Step 5. Creating a user for publishing to Drupal
Create a user account that the Enterprise Server plug-in can use for logging in to Drupal.
Use one of the following methods:
- Use the account that you created while setting up Drupal (see step 1. Setting up Drupal).
- Create a new user with enough rights to create, update, and delete nodes.
Step 6. Mapping Issues to content types
Issues in Enterprise need to be mapped to content types in Drupal so that content that is stored in the Issue can be directly published to those content types.
The mapping is done by mapping Categories of an Issue to specific content types. This way, when a Dossier that is assigned to such a Category is published, the content of that Dossier is published to that content type.
Example: You could have an Issue set up for a Knowledge Base with the aim to publish its articles to the Drupal Book module. By mapping all categories of the Issue to the Drupal Book module, each time a Dossier of that Issue is published, it is automatically published as a Book page in Drupal.
Step 6a. In Enterprise Server, define (additional) Categories.
Step 6b. Access the Issue Maintenance page for the Issue in which the mapping should take place.
Step 6c. In the Category Mapping section, do the following:
Step 6c.1. From the Category list, choose a Category.
Tip: Choose "<All>" to map all Categories in one go.
Step 6c.2. From the Content Type list, choose a Content Type.
Step 6c.3. (Optional) From the Terms list, select a vocabulary.
Note: Click Update to update this list.
Step 6c.4. (Optional) from the Required Text Components, choose those components which should be available in the article when it is published to Drupal.
Step 6c.5. (Optional) Select Image Required to enforce the use of an image.
Step 6d. Click Update to store the changes.
Step 7. (Optional) Creating vocabularies and terms
Note: This step only has to be followed when you want to publish directly from an Enterprise Issue to a term in a Drupal vocabulary.
Create a vocabulary with terms by following the steps in the Drupal Help: Organizing content with taxonomies.
Notes:
|
Step 8. Enabling file upload attachments
If you want to upload and add attachments to a Drupal node, you need to enable this functionality in the content type edit screen in Drupal.
Please refer to the Drupal Help: Working with files in Drupal 6.
Step 9. Enabling image attachments
If you want to upload and add images to a Drupal node, you need to enable this functionality in the content type edit screen in Drupal. Please refer to the Drupal Help: Image.
Step 10. Configuring the Drupal config file
Step 10a. Open the config_drupal.php file.
Step 10b. Configure any of the following arrays:
Description: Used for configuring general options.
- layout rendition. Select which rendition you want to send to Drupal for layouts. Options:
- thumb
- preview
- native
- output (default)
- writer. Select which user you want to add to a node.
Note: The Enterprise fields "username" and "fullname" are sent to Drupal and are matched to a Drupal user.
- Options:
- publisher: the publisher of the dossier (default)
- writer: the writer of the element body
- modifier: the modifier of the element body
- none: the user in the sites array will be used
If the user cannot be found in Drupal, the user configured for the site is used.
- title_fallback. Define how the title should be determined if the title element is empty. Options:
- description: Dossier description
- name: Dossier name
- name/description: first Dossier name, if empty then Dossier description
- description/name: first Dossier description, if empty then Dossier name (default)
- components.(Required option). Map the Drupal text components to the Enterprise text components as follows:
{drupal_component} => {enterprise_component}
The available Drupal components are:
- title
- teaser
- body
These must correspond to an element defined in the componentDefs.xml file in Enterprise server.
Please refer to Defining styles for HTML articles in Content Station 9.
Description: For mapping Drupal fields to the content of (custom) metadata in Enterprise. The name of the Enterprise metadata property is used as values in this array. This is automatically mapped to the content of the metadata property for the Dossier.
Note: For certain options a specific Drupal module is needed. These modules need to be installed, enabled and configured correctly.
-
pagetitle. Metadata type "string". If set, the <title> tag in Drupal is different from headline.
Requires the Drupal module "page_title" (see Drupal Help: Page Title).
-
urlpath. Metadata type "string". If set, the URL path can be set with a custom URL (for SEO purposes).
Requires the Drupal module "path".
-
description. Metadata type "string". If set, this string is used for the HTML metatag (for SEO purposes).
Requires the Drupal module "nodewords" (see Drupal Help: Nodewords: D6 Meta Tags).
-
keywords. Metadata type "multistring". If set, this string is used for the HTML metatag (for SEO purposes).
Requires the Drupal module nodewords (see Drupal Help: Nodewords: D6 Meta Tags).
- comments. Metadata type list. Options:
- disable
- read
- read/write
Corresponds to the options for comments for Drupal nodes. Default: Drupal content type "default".
- sticky. Metadata type "boolean". For defining if a node must be sticky. Default: Drupal content type "default".
- promote. Metadata type "boolean". For defining if the node should be promoted to the front page. Default: Drupal content type "default".
- taxonomy. Metadata type "multistring". If set, this string is used to map keywords to Drupal taxonomy. This is set as follows:
‘VOCABULARY_NAME’ => ‘METADATA_NAME’
Note: Multiple options can be given.
Description: contains the site definitions. One or more sites can be defined. The site array itself uses a unique name for a site as keys.
- url. The URL for the Drupal site. Needs to start with http:// and end with a forward slash /.
- username. The username of the Drupal publisher, used for publishing content to the site.
- password. Password of the Drupal publisher, used for publishing content to the site.
- local_cert. Full file path of the local CA certificate file (in PEM format). Required for HTTPS (SSL) connections only. See the SSL SDK for how to generate certificates.
- options. An array in the structure of the options array, used to override settings for a particular site.
- mapping. An array in the structure of the mapping array, used to override settings for a particular site.
Description: For overriding the Brand, Publication Channel, or Issue used for a certain site.
Note: If you used characters other than Latin, use the Brand id, Publication Channel id, or Issue id.
- brand. The ID or name of the Brand to override.
- channel. The id or name of the Publication Channel to override.
- issue. The ID or name of the Issue to override.
- site. The unique name (key) of the element in the sites array.
Step 11. Enabling the Drupal 6 Server plug-in
The Drupal functionality in Enterprise needs to be enabled by enabling the Drupal 6 Server plug-in.
Step 11a. Log in to Enterprise Server.
Step 12a. Click Server Plug-ins in the Maintenance menu or on the Home page. The Server Plug-ins page appears.
Step 13a. Enable the plug-in named Drupal 6 by clicking the Unplugged icon . It changes to a Plugged In icon .
Step 12. Testing Enterprise Server
To complete the process, test if the integration has been performed successfully.
Step 12a. Log in to Enterprise Server.
Step 12b. In the Maintenance menu, click Advanced. A page showing links to advanced Enterprise options appears.
Step 12c. Click Health Check. The Health Check page appears.
Step 12d. Run the Publish to Drupal test. The test result is displayed.
Step 12e. (Optional, only if the test failed). Follow the instructions and run the test once more after making any changes to the Drupal configuration. Repeat this process until the test is performed successfully.
Step 13. Configuring Publication Channels
In Enterprise, publishing content to Drupal is done through a Publication Channel.
Step 1. In Enterprise, create a new Publication Channel for a Brand:
Step 1a. In the Name field, enter a name.
Step 1b. (Optional) In the Description field, enter a description.
Step 1c. From the Publication Channel Type list, choose Web.
Step 1d. From the Publish System list, choose Drupal 6.
Step 1e. Leave the Suggestion Provider option set to None.
Step 2. Click Create.
New items appear on the page:
- An additional property named 'Current Issue' appears below the Publication Channel Type property.
- Below the Publication Channel properties area, a section for adding Issues appears.
Creating Issues
Step 3. Click Add Issue.
The Issue Maintenance page appears.
Step 4. Fill out the details.
Note: At the most basic level, only a name needs to be entered; all other options can also be set at a later stage by modifying the created Issue.
- Name. Name of the Issue.
- Subject. This feature is currently not functional.
- Description. Description of the Issue.
- Active. Use to deactivate the Issue. This will hide the Issue and all objects assigned to the Issue from the users without actually removing the Issue from the system
Step 5. Click Update.
Finishing the setup
Step 6. Click the arrow at the bottom of the page to return to the Publication Channel Maintenance page.
Step 7. (Optional) Add additional Issues as needed.
Step 8. Click the arrow at the bottom of the page to return to the Brand Maintenance page.
Step 9. (Optional) Add additional Publication Channels as needed.
Step 10. (Optional, only if multiple Publication Channels have been created) From the Default Publication Channel list at the top of the Brand Maintenance page, choose the default Publication Channel that should act as the default Drupal channel.
Figure: The Default Publication Channel list.
Related Information
About Publish Forms and Publish Form templates in Enterprise 9
Reference Materials
Comment
Do you have corrections or additional information about this article? Leave a comment! Do you have a question about what is described in this article? Please contact Support.
0 comments
Please sign in to leave a comment.