Giter Club home page Giter Club logo

restrict-creation's Introduction

Flowpack.RestrictCreation

Imagine the situation: you have a website with 'English (US)', 'English (UK)' and 'German' content dimensions present.

Now you never want editors to create new nodes directly in 'English (UK)', without first creating them in 'English (US)' and almost never in 'German', but some really rare cases.

This package provides an option to enforce these kind of constraints:

restrictcreation

Getting started:

  1. composer require 'flowpack/restrictcreation'
  2. Configure your dimensions in Settings.yaml, e.g. like this:
Neos:
  ContentRepository:
    contentDimensions:
      language:
        presets:
          en_US:
            label: 'English (US)'
            values:
              - en_US
            uriSegment: en
          en_UK:
            label: 'English (UK)'
            values:
              - en_UK
              - en_US
            uriSegment: uk
            restrictCreation:
              mode: disallow
              originPreset: en_US
          de:
            label: German
            values:
              - de
            uriSegment: de
            restrictCreation:
              mode: warn
              originPreset: en_US
              documentNodesOnly: true
  • mode: warn would only give a warning about creating a node in a possible wrong dimensiong.
  • mode: disallow would completely forbid creating new nodes in a certain dimension.
  • documentNodesOnly: true would trigger the warning only for document nodes: you would be able to create content nodes as usual, but creating document nodes in that dimension would be blocked/warned.

Acknowledgments

The initial development of this package is sponsored by web&co.

restrict-creation's People

Contributors

dimaip avatar samuelhauser avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.