【问题标题】:Typo3 Neos: Filefield in Custom Content TypeTypo3 Neos:自定义内容类型中的文件字段
【发布时间】:2014-03-19 18:47:43
【问题描述】:

我想制作一个可以编辑下载文件的自定义内容类型。在我的 NodeTypes.yaml 中,我有:

'Vendor.Prefix:MyContentType':
  superTypes: ['TYPO3.Neos:Content']
  ui:
    label: My Content Type
    icon: 'icon-file-text'
    inspector:
      groups:
        'props':
          label: Properties
  properties:
    'title':
      type: string
      defaultValue: 'Example Title'
      ui:
        label: 'Title'
        inlineEditable: TRUE

现在 - 如何创建文件上传字段?我只找到了图像字段的工作示例:

'chapterImage':
  type: 'TYPO3\Media\Domain\Model\ImageVariant'
  ui:
    label: 'Chapter image'
    reloadIfChanged: TRUE
    inspector:
      group: 'document'

在同一个文件夹中,有文件上传的类,但这不起作用:

'grundriss':
  type: 'TYPO3\Media\Domain\Model\Document'
  ui:
    label: 'Grundriss'
    editor: 'TYPO3.Neos/Inspector/Editors/FileUpload'
    inspector:
      group: 'props'

无论有无“编辑器”行。会导致 JavaScript 错误:

Uncaught TypeError: Cannot read property 'editor' of undefined 
Uncaught Error: You cannot modify child views while in the inBuffer state 

还有一个空的属性检查器。

有人给我小费吗?

【问题讨论】:

    标签: neoscms


    【解决方案1】:

    确实,这行不通。我们在当前 1.1 beta 版本中合并了一种链接到各种资产文件的方法。也许检查一下。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-02-14
      • 2020-04-03
      • 2017-07-24
      • 2012-09-03
      • 2014-10-01
      • 1970-01-01
      • 1970-01-01
      • 2010-09-08
      相关资源
      最近更新 更多