punktde/nodereplicator

Last activity 23 Jul 2021 6 2 1614
composer require punktde/nodereplicator

Replicate Neos node structure and content to other content dimensions

2.3.1

Version
2.3.1
Type
neos-package
Release Date
Jul 23, 2021 10:09
Source
git
Distribution
zip
Requires
MIT d94baa0c06743d9650ce4385f781a23b0d14f2e7

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
replication.createHidden Replicated nodes are created as hidden nodes
replication.excludeProperties Do not update values of these properties in the target node

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
      
      
'Vendor.Package:TranslateableCategory':
  superTypes:
    'Neos.Neos:Content': true
  ...

  options:
    replication:
      structure: true
      content: true
      updateEmptyPropertiesOnly: true
      createHidden: true
    
'Vendor.Package:YetAnotherAddressCategory':
  superTypes:
    'Neos.Neos:Content': true
  ...
  
  options:  
    replication:
      structure: true
      content: true
      excludeProperties:
        - metaDescription
        - metaKeywords
The content of the readme is provided by Github
The same vendor provides 33 package(s).