我尝试创建一个自定义节点类型,例如多列,默认值ContentCollection
应该使用附加属性进行扩展。到目前为止,后端和前端视图都有效。但是如果更改了 的属性,编辑器会在 JavaScript 超时错误中运行span
。ContentCollection
控制台中没有错误或警告。
错误信息:
警告:不回答脚本
Ein Skript auf dieser Seite ist eventuell beschäftigt oder es antwortet nicht mehr。Sie können das Skript jetzt stoppen, im Debugger öffnen oder weiter ausführen。
脚本: http ://domain.com/_Resources/Static/Packages/TYPO3.Neos/JavaScript/ContentModule-built.js:389
要重现,请执行以下操作:
使用站点包“TYPO3.NeosDemoTypo3Org”。TYPO3 Neos v1.1.2。创建一个包“Selector.Test”
配置/Settings.yaml
TYPO3:
Neos:
typoScript:
autoInclude:
'Selector.Test': TRUE
nodeTypes:
groups:
selectorTest:
label: 'Selector Test'
position: 10
配置/NodeTypes.Columns.yaml
'Selector.Test:RowAbstract':
abstract: TRUE
superTypes:
- 'TYPO3.Neos:Content'
ui:
label: 'Columns'
group: 'selectorTest'
icon: 'icon-columns'
inlineEditable: TRUE
inspector:
groups:
columnSettings:
label: 'Column settings'
position: 10
# Create a custom ContentCollection
'Selector.Test:ColumnContentCollection':
superTypes:
- 'TYPO3.Neos:ContentCollection'
ui:
label: 'Column Content Collection'
icon: 'icon-list'
inlineEditable: TRUE
inspector:
groups:
columnSpan:
label: 'Column span'
position: 10
properties:
span:
type: string
defaultValue: ''
ui:
label: 'Span'
reloadIfChanged: TRUE
inspector:
group: 'columnSpan'
# Define row with custom ContentCollection
'Selector.Test:Row':
superTypes:
- 'Selector.Test:RowAbstract'
childNodes:
column0:
type: 'Selector.Test:ColumnContentCollection'
column1:
type: 'Selector.Test:ColumnContentCollection'
资源/私人/TypoScript/Root.ts2
prototype(Selector.Test:Row) < prototype(TYPO3.Neos:Content) {
templatePath = 'resource://Selector.Test/Private/Templates/NodeTypes/Row.html'
attributes {
class = 'row'
}
columns = TYPO3.TypoScript:Collection {
collection = ${q(node).children('[instanceof TYPO3.Neos:ContentCollection]')}
itemRenderer = Selector.Test:Column
itemName = 'node'
}
}
prototype(Selector.Test:Column) < prototype(TYPO3.TypoScript:Template) {
node = ${node}
templatePath = 'resource://Selector.Test/Private/Templates/NodeTypes/Column.html'
attributes = TYPO3.TypoScript:Attributes {
class.span = ${q(node).property('span') ? q(node).property('span') : null}
}
columnContentCollection = TYPO3.Neos:ContentCollection {
nodePath = '.'
}
}
资源/私人/模板/NodeTypes/Column.html
{namespace ts=TYPO3\TypoScript\ViewHelpers}
<div{attributes -> f:format.raw()}>
<ts:render path="columnContentCollection" />
</div>
资源/私人/模板/NodeTypes/Row.html
{namespace ts=TYPO3\TypoScript\ViewHelpers}
<div{attributes -> f:format.raw()}>
<ts:render path="columns" />
</div>