NodeTypes and .fusion are not overwritten


(Patric Eckhart) #1

Hey guys,

I have added a NodeTypes.Columns.yaml in my Configuration Folder. This should overwrite the standard Layout values, like in the Neos.Demo Package.

'Neos.NodeTypes:TwoColumn':
  properties:
    'layout':
      defaultValue: '8-4'
      ui:
        inspector:
          editorOptions:
            values:
              '50-50': ~
              '75-25': ~
              '25-75': ~
          '66-33': ~
          '33-66': ~
          '6-6':
            label: '50% / 50%'
          '8-4':
            label: '66% / 33%'
          '4-8':
            label: '33% / 66%'

and the MultiColumn.fusion

prototype(Neos.NodeTypes:MultiColumn) {
    attributes.class = 'row'
    columns.iterationName = 'multiColumnIteration'
}

and the MultiColumnItem.fusion

prototype(Neos.NodeTypes:MultiColumnItem) {
    attributes.class = ${'col-sm-' + String.split(q(node).parent().property('layout'), '-')[multiColumnIteration.index]}
}

but in the backend and also in the frontend nothing is changed. I have flush the caches and run a package rescan.
Other NodeTypes like a Divider or a YouTube Element are working without any problems.

Can you help me?


(Patric Eckhart) #2

Okay, I found a solution. I have moved my Plugin/Package from Packages/Plugins in Packages/Application
It works only in Sites or Applications, not in Plugins.

Why?

Thx,
Pat


(nicola Cerchiari) #3

Hi @patriceckhart, as for my experience with these kind of issues, the first place to look into is the package loading order.
As I was taught right here on Discuss, you should explicitly specify dependencies in your package composer.json in order to make package loading order predictable.

In your case place the package you are trying to overwrite (Noes.NodeTypes, if I’m not wrong) among the dependencies of the package with which you are trying to overwrite the former one.

Hope it helps,
Nicola


(Patric Eckhart) #4

Hi Nicola!

Thank you, it works.

Pat