punktde/nodereplicator

Last activity on 3 March 2020
  • 3
  • 1
  • 1339
composer require punktde/nodereplicator

Replicate Neos node structure and content to other content dimensions

2.1.0

Replicate Neos node structure and content to other content dimensions

Version
2.1.0
Type
neos-package
Release Date
03.03.2020 08:39:28
Source
git
Distribution
zip
Requires
Requires (dev)
None
Suggest
None
Provides
None
Conflicts
None
Replaces
None
e32895c392d1acc138cf6f3c1482a2a99517ace9

PunktDe NodeReplicator

Latest Stable Version Total Downloads License

This package provides an additional option for the NodeType configuration to automatically update this node in other dimensions.

The problem, this package solves

Scenario: On a multi language page, without configured fallbacks, you want to show addresses. The addresses are content nodes. An address entry should reference a country and a category. Country and categories should be content nodes too. While the title of a category and country needs to be translated for every language, the address itself stays the same for every language.

The problem: As soon, as you translate the page which contains the content nodes from language A to language B, you are no longer able to add nodes in both languages which have the same identifier. Without fallback you would need to add an address on every language separately with the references to the corresponding nodes.

The solution: This package adds a configuration option to the node type configuration called replication. Which allows you to specify if a node should be automatically replicated to all dimensions where the parent node already exists and also if the content in the alternative dimensions should be updated on change.

Configuration

Options:

Option Description
replication.structure Automatically create and remove the node in other dimensions
replication.content Automatically update the content of the corresponding nodes in other dimensions
replication.updateEmptyPropertiesOnly When updating content, only update empty properties

Example Configuration:

'Vendor.Package:Address':
  superTypes:
    'Neos.Neos:Content': true
  ...
  
  options:
    replication:
      structure: true
      content: true
    
'Vendor.Package:AddressCategory':
  superTypes:
    'Neos.Neos:Content': true
  ...
  
  options:  
    replication:
      structure: true
      
'Vendor.Package:AnotherAddressCategory':
  superTypes:
    'Neos.Neos:Content': true
  ...
  
  options:  
    replication:
      structure: true
      content: true
      updateEmptyPropertiesOnly: true
    
The content of the readme is provided by Github
The same vendor provides 30 package(s).