Create related content
This is a templating system for new content.
The motive behind the module was the need for an easy way to create a site from a non-importable format, such as contracts, wireframes and design files, and to maintain content menu relationships when creating new content. These create sibling / child options are a life-saver on deep complex menu systems, which is where the name "Create related content" is derived.
Contribute your ideas
Looking at ideas for a better user interface, especially for the template creation/edit page. Log your ideas here.
Usage
There are three main methods of using the module.
- Do nothing!
- You can configure templates to automatically populate the standard "Create content" form.
- Creating related content
- Provides a simple form for content type selection, title and menu options. These prepopulate the standard create content form from combining these details with a configurable template. Available as a local menu task or as a block for existing node pages.
- Manual menu link
- Custom link that allows you to prepopulate the standard create content form from a preset.
The link has the format, ?q=node/add/[type]/crc-preset/[template id]
Setup
All methods require that the logged in user has permission to create content, either "administer nodes" for complete access or the "create xxxx content" for content type specific access. To administer the module, you need "administer content types" permission.
Step One: Create a template.
To use a template, you first need to create one. Navigate to:
Admin > Site configuration > Create related content > Add template
If your site is structured around the menu system, choose a setup like:
Default menu link title: Copy user specified title
Default parent item behavior: Unrelated
If the template is for a specific content type that resides in a certain part of your site, select "Custom parent menu item". Content created by the template will set this menu item even if the user does not have permission to administer menu items.
Body settings: As a developer, I usually set the "Lorem lpsum" option, but either "Empty" or "Custom" will suit most sites.
Body filter settings: Default
Author settings: Logged in user
Timestamp settings: Custom
Leave the field empty to use the time of form submission.
Taxonomy settings: Empty
If your site is tagged based, a setup like this would be more appropriate.
Default menu link title: None
Default parent item behavior: Unrelated
Taxonomy settings: Clone
The other options would be similar.
The usage of the options "Default menu link title" and "Taxonomy settings" are dependent on the usage of the extended module functionality that allows you to create content based on existing content.
Step Two: Active the template.
To use the template you have created, you need to assign it. Navigate to:
Admin > Site configuration > Create related content > Configure content type defaults
Here you have the option of assigning the template globally or to specific templates.
Step Three: Extended functionality.
Three permissions control the extended functionality:
access create related content block is required to use the block. The block also needs to be assigned to a region. This only shows up on content pages.
access create related content menu is required to activate the local menu task "Create related content" on content pages.
create related content by preset is required to use the custom menu links.
Fields covered
The approach here was to be very selective on what should be cloned. There is no <?php $new_node = drupal_clone($existing_node); ?>.
The following fields are covered. Many have token integration.
- Title
- Uses the raw input from the user or a template field.
- Publishing options
- Not covered. Uses the content type defaults.
- Authoring information
- This can set to clone the existing nodes author, use the logged in users (Drupal default), or use a predefined user.
- The date can also be cloned, predefined or Drupal default
- Body
- Either cloned, blank, cloned from an preselected node, custom text or configurable "Lorem ipsum ..." content.
- Default format can be set, but this is limited to the formats that the user is allowed to access.
- Menu
- This can use a defined title template or to use the data entered by the user.
- The parent menu item can be set to be a predetermined item, same as the existing node (a sibling) or the existing items menu item (a child).
- Taxonomy
- Either cloned or blank.
Hooks can be used to extend this out to other fields.
Recommended modules
Token module support is integrated into the module and greatly extends the functionality of the module.
Related modules
Node Clone can be used to clone all of the fields of existing nodes.
Node Export can be used to export and import existing nodes.
Skeleton outlines for book templates.
Devel - Generate content for bulk node generation.
Prepopulate prepopulates the node from query parameters.
Field Thief prepopulates fields from another node (D5)
Node Template prepopulates primary fields from another node to another (D5)
Also
Node Relativity maintains relationships between nodes.
Releases
| Official releases | Date | Size | Links | Status | |
|---|---|---|---|---|---|
| 6.x-1.1 | 2009-Apr-24 | 29.88 KB | Download · Release notes | Recommended for 6.x | |
| Development snapshots | Date | Size | Links | Status | |
|---|---|---|---|---|---|
| 6.x-1.x-dev | 2009-Apr-28 | 29.97 KB | Download · Release notes | Development snapshot | |
