0

ダウンロード ファイルを編集できるカスタム コンテンツ タイプを作成したいと考えています。私の 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'

「editor」行があってもなくても。JavaScript エラーが発生します。

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

そして、空のプロパティ インスペクタに。

ヒントはありますか?

4

1 に答える 1

0

確かにこれはうまくいきませんでした。現在の 1.1 ベータ リリースでは、あらゆる種類のアセット ファイルにリンクする方法を統合しました。多分それをチェックしてください。

于 2014-04-23T15:03:32.880 に答える