2017 © Pedro Peláez
 

neos-package silhouettes

Preconfigure property-silhuettes that can be applied to various properties of multiple NodeTypes.

image

sitegeist/silhouettes

Preconfigure property-silhuettes that can be applied to various properties of multiple NodeTypes.

  • Thursday, July 12, 2018
  • by grebaldi
  • Repository
  • 4 Watchers
  • 11 Stars
  • 2,103 Installations
  • PHP
  • 1 Dependents
  • 1 Suggesters
  • 1 Forks
  • 0 Open issues
  • 5 Versions
  • 139 % Grown

The README.md

Sitegeist.Silhouettes

Neos 7.0 includes the features of Sitegeist.Silhouettes as NodeType presets. This package will be abandoned in favor of that eventually!, (*1)

Centralized property configuration for the Neos.ContentRepository, (*2)

It is common that properties in various NodeTypes are expected to behave identically. This is usually achieved with mixins but those are bound to a fixed property name do not cover the case where properties with different names share similarities., (*3)

The Sitegeist.Silhouettes package uses preconfigured property-configurations from the settings in multiple NodeTypes. This adds a way to centralize property-configuration for cases where mixins are not sufficient and settings shall be synchronized betweeen properties with different names., (*4)

It is also possible to create silhouettes for childNode constraint configurations, e.g. to apply the same centralized constraints to different childNodes following the dry principle. This can also be useful when using a single NodeType package in different neos instances where the constraints may differcenate., (*5)

The settings from the configured silhouette are merged with the configuration that is found in the nodeType with the local configuration taking precedence over the silhouette., (*6)

Authors & Sponsors

  • Martin Ficzel - ficzel@sitegeist.de

The development and the public-releases of this package is generously sponsored by our employer http://www.sitegeist.de., (*7)

Usage

Settings.yaml, (*8)

Sitegeist:
  Silhouettes:
    properties:
      vendor:
        text:
          block:
            type: string
            defaultValue: ''
            ui:
              inlineEditable: true
              inline:
                editorOptions:
                  placeholder: '(( text block ))'
                  autoparagraph: true
                  linking:
                    anchor: true
                    title: true
                    relNofollow: false
                    targetBlank: false
                  formatting:
                    strong: true
                    em: true
                    u: false
                    underline: false
                    strikethrough: false
                    sub: false
                    sup: false
                    del: false
                    p: true
                    h1: false
                    h2: false
                    h3: false
                    h4: false
                    h5: false
                    h6: false
                    pre: false
                    removeFormat: true
                    left: false
                    right: false
                    center: false
                    justify: false
                    table: false
                    ol: false
                    ul: false
                    a: true

      childNodes:
        vendor:
          defaultConstraints:
            constraints:
              'Neos.Neos:Content': true
              'Neos.NodeTypes.BaseMixins:TitleMixin': true
              'Neos.Demo:Constraint.Content.Carousel': true
              'Neos.Demo:Constraint.Content.Column': false

NodeTypes.yaml, (*9)

'Vendor.Package:NodeTypeName':
  childNodes:
    column1:
      options:
        silhouette: 'vendor.defaultConstraints'    
    column2:
      options:
        silhouette: 'vendor.defaultConstraints'    
  properties:
    description:
      ui:
        label: 'Description'
        inline:
          editorOptions:
            placeholder: 'please add description ... '
      options:
        silhouette: 'vendor.text.block'

Predefined silhouettes

  • text.plain: An inline editable string where no formatting is allowed.
  • text.block: An inline editable string where only inline formatting is enabled.
  • text.free: An inline editable string where all formatting including blocks is allowed.

Installation

Sitegeist.Silhouettes is available via packagist. Add "sitegeist/silhouettes" : "^1.0" to the require section of the composer.json or run composer require sitegeist/silhouettes., (*10)

We use semantic-versioning so every breaking change will increase the major-version number., (*11)

Contribution

We will gladly accept contributions. Please send us pull requests., (*12)

The Versions

12/07 2018

dev-master

9999999-dev

Preconfigure property-silhuettes that can be applied to various properties of multiple NodeTypes.

  Sources   Download

GPL-3.0-or-later

The Requires

 

12/07 2018

v1.0.2

1.0.2.0

Preconfigure property-silhuettes that can be applied to various properties of multiple NodeTypes.

  Sources   Download

GPL-3.0-or-later

The Requires

 

12/07 2018

dev-mficzel-patch-1

dev-mficzel-patch-1

Preconfigure property-silhuettes that can be applied to various properties of multiple NodeTypes.

  Sources   Download

GPL-3.0-or-later

The Requires

 

27/04 2018

v1.0.1

1.0.1.0

Preconfigure property-silhuettes that can be applied to various properties of multiple NodeTypes.

  Sources   Download

GPL-3.0-or-later

The Requires

 

29/01 2018

v1.0.0

1.0.0.0

Preconfigure property-silhuettes that can be applied to various properties of multiple NodeTypes.

  Sources   Download

GPL-3.0-or-later

The Requires