Cloning Content in a LocalGov Drupal website
Entity clone will clone entities, but would clone the each entity on the page at the same time.
Replicate is an API-first module, without a UI (you can install Replicate UI if you want), but gives us full control over everything we want to do with our cloning feature.We chose the Replicate module to use for this feature. Node clone will only clone nodes and we might in the future want to clone more entities, such as custom entities.

  1. Allow site owners decide what content types could have their content cloned, and
  2. Allow site editors to then clone pages from those content types.

Often on a council website you could have a lot of events and you might want to have all the same info for the events, but a different date, image, and signup link. Being able to clone a default event is a great time saver in this case.

Why Clone Content?

I spent last week and this week working mostly on editor experience issues for LocalGov Drupal. Last week was small bug fixes and features, and this week I spent my time getting a new module created that would do two things:Thanks to Big Blue Door for sponsoring my time to work on this.

How does it LocalGov Replicate module work?

This is a feature request that councils have been asking for for quite a while.I have one major issue with it at the moment, which is that the “Replicate” tab is showing up for all content types no matter what you choose on the settings page. 

  1. Create a copy of the current page, and 
  2. Bring you to that new version of the page so you can start editing it, and
  3. Leave the new page unpublished until you are ready to publish it.

Node Clone Vs Entity Clone Vs Replicate

This week as part of my “Editor Experience” work for LocalGov Drupal, I worked on creating a feature to allow editors to clone pages of their sites.Nope, not by a long shot. Once I get that solved, I need to see what happens when you clone nodes with media and other entities in them. I guess we want to reference media, taxonomy, etc, but we want to clone paragraphs. Then we’ve the trickier question of reusable paragraphs in our “Page Components” module which I guess we also want to reference rather than clone, so if we update for example an address, it will update everywhere.

Is it feature complete?

Now when you visit any nodes of these types, there will be a new tab (besides the “View | Edit | Delete” tabs) called “Replicate”. When you click on that it will:Beautifully crafted digital products and experiences that matter.

Filed Under:

  1. Drupal Planet
  2. Drupal
  3. Open Source
  4. LocalGov Drupal

Similar Posts