Contextual Shared comments on nodes that are clones of one another

Solutions

There's many routes which to take for this. Drupal 8 gives you a bit more flexibility than previous versions. For the sake of managing a shared comment section, you can go about creating a new body-less content type that only contains:

  • A comment field
  • A node reference field with 2 entries (one for the parent & child cloned node)

Upon your clone operation, you can create a new entity with a dummy, to-be-hidden, title and the node reference field populated with the parent/child nodes.

For display/commenting, you can create a block view that uses a Provide default value: Raw value from url (Path component: 2) (i.e. the node id) contextual filter so the block only displays the shared comment entity on viewing the child/parent nodes.

Tags: Drupal 8 / Comments

Similar questions

Robust handling of the pager in an Ajax controlled View, when URI is shared with another user?
I have a gallery content type, it references a number of images. When viewing gallery content, a View renders a gallery image, and a pager set to display a single item at a time allows the user to go back and forth with a link that will change the url. As a user, I can now copy the URL and send it to someone else, who will see exactly the same imag...
Drupal shared tables, but from another database
I have a Drupal Multisite set up with hundreds of sites. I want to make some tables shared (like banners, and roles) so I don't have to update hundreds of sites when changing a banner (for example). I know this can be done using these strings in settings.php: But ... what if I have a multiple database setup as well? I have one database that holds a...
Exporting comments only from one drupal site to another
How can i export only comments from a Drupal Site (Live) to a Drupal site (Dev). The content of both sites is same. The live site only has new users and comments. I already exported the users and imported into Dev Site. I looked into many modules but non on them only allow comments to be exported. Can i simply copy some MySql tables ? thanks
Libraries shared by more than one installation?
I am working with several Drupal 8 installs On a shared hosting environment. I've got them up and running and they are looking great thanks to the MoreThanThemes themes I'm using. I'm at the stage of adding modules that require libraries. It would be great if I could simply maintain libraries in a folder like /Home/[accountname]/Libraries outside o...
How to pass contextual id value from one view page to another through Drupal menuing system
QUESTION: How can I pass the contextual filter value (5 in this example) from one page to another via the menu? For example, if at /books/title?topic=5 I click "By Date", I want to go to /books/date?topic=5. How can I set that up? NOTES BONUS Assuming this problem can be solved, I'd really like to use clean URLs. So instead of /books/title?topic=5 ...
How do I create a multisite with shared users and nodes?
I want to create a multisite with Drupal 7: Every site works separately but users, and nodes must be shared among the sites. How do I achieve it?

Also ask

We use cookies to deliver the best possible experience on our website. By continuing to use this site, accepting or closing this box, you consent to our use of cookies. To learn more, visit our privacy policy.