簡體   English   中英

Typo3 Neos:自定義內容類型中的文件字段

[英]Typo3 Neos: Filefield in Custom Content Type

我想制作一個可以編輯下載文件的自定義內容類型。 在我的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 

並交給一個空的財產檢查員。

有誰給我小費嗎?

確實,這是行不通的。 在當前的1.1 beta版本中,我們合並了一種鏈接到各種資產文件的方法。 也許檢查一下。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM