Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: Views Bootstrap 5.5.4 — Minor update available for module views_bootstrap (5.5.4). Release: Rightup theme 1.0.3 — Minor update available for theme vartheme_bs5_rightup (1.0.3). Release: CommentOn 1.0.6 — Minor update available for module commenton (1.0.6). Release: ChatGPT Ads 1.0.3 — Minor update available for module chatgpt_ads (1.0.3). Release: Opensolr Search 5.1.3 — Minor update available for module opensolr_search (5.1.3). Release: ServiceM8 Webform Integration 1.2.1 — Minor update available for module servicem8_webform (1.2.1). Release: PostfixAdmin 1.0.0 — Initial release available for module postfix_admin (1.0.0)! Release: ip_analyser 1.0.3 — Minor update available for module ip_analyser (1.0.3). Module Revived: Swagger-PHP OpenAPI 3 documentation generator 1.0.0 — Module swagger_php updated after 10 months of inactivity (1.0.0). Security Coverage: Microsoft Azure AI — Module ai_provider_azure now has official Drupal security advisory coverage.

Makes it easy to give site users a button to create content that references the content that they were looking at.

Features

People should be able to easily create new content that references the content they are viewing.

This module helps you make that possible, by giving site builders the ability to add a button to pieces of content of a given type that authorized visitors can use to create content referencing that content.

Use cases

Your website has academic articles and allow people to post full responses that undergo a content moderation workflow— more than you would want to handle with comments. You can use this module to add "Leave a review" buttons that create Review content which references Article content.

A recipe site allows people to post their own "inspired by" recipes. This module can help a site builder configure recipes to show a "Post your take on this recipe" button that opens a form to add a recipe, with back-reference to the recipe that inspired it already filled in.

Installation

Install with composer require 'drupal/create_referencing_content:^1.0@alpha'

Post-Installation

  1. Create an extra field display of type at /admin/structure/extra-field/add by selecting "Create Referencing Content button" as the Extra Field Provider and choosing your referenced content type(s) to Enable On.
  2. Administer the display of your referenced content type, for example for "Employer" content go to /admin/structure/types/manage/employer/display and enable the field named what you set in the step before, and then press the gear icon to set the Button label, Tooltip, Classes, and Target field (on the referencing content type). Remember to both press Update for your button display settings and then Save for the whole page.

The Entity Prepopulate settings for the target field will be updated for you automatically.

Additional Requirements

All three will be installed automatically. Extra Field Plus will only be used behind the scenes.

Works great with Read-only field widget module.

Similar projects

There are modules that help you create the content that the content you are currently editing references, such as Create link on entity reference field, but not any that do rather the opposite, what this module does.

The alpha2 release of this module works with the Prepopulate module and could be the basis of a project doing exactly the same but with Prepopulate instead of EPP. As of alpha3 we switched to the more modern Entity Prepopulate module to achieve better integration with Read-only field widget.

Supporting this Module

You can support Agaric's overall contributions to Drupal and a bit beyond by supporting Drutopia at opencollective.com/drutopia. Thanks!!

Community Documentation

… is welcome.

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
4
Tracked since
Sep 2024
Latest release
2 years ago
Releases (12 mo)
0
Maintenance
Dormant

Release Timeline

Releases

Version Type Core Release date
1.0.0-alpha3 Pre-release 8–11 Sep 15, 2024
1.0.0-alpha2 Pre-release Sep 4, 2024
1.0.0-alpha1 Pre-release Sep 4, 2024
1.0.x-dev Dev Sep 2, 2024