[Neos] Filefield in Custom Content Type
Andy Adiwidjaja
adiwidjaja at gmail.com
Fri Mar 21 09:52:52 CET 2014
Hello all,
I am new to Typo3 Neos and to this mailinglist. I'm not an active
typo3-developer but neos is really great, but has some open ends. My
current question, also unanswered on Stackoverflow:
http://stackoverflow.com/questions/22515418/typo3-neos-filefield-in-custom-content-type
I want to make a custom content type with the possibility to edit a
download file. In my NodeTypes.yaml I have:
'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
Now - how do I create a file upload field? I only found working examples
for image fields:
'chapterImage':
type: 'TYPO3\Media\Domain\Model\ImageVariant'
ui:
label: 'Chapter image'
reloadIfChanged: TRUE
inspector:
group: 'document'
In the same folder, there are classes for file uploads, but this doesn't
work:
'grundriss':
type: 'TYPO3\Media\Domain\Model\Document'
ui:
label: 'Grundriss'
editor: 'TYPO3.Neos/Inspector/Editors/FileUpload'
inspector:
group: 'props'
Neither with nor without the 'editor' line. It leads to the javascript
error:
Uncaught TypeError: Cannot read property 'editor' of undefined
Uncaught Error: You cannot modify child views while in the inBuffer state
And to an empty property inspector.
Has anyone a tip for me?
Thanks in advance for your help!
Andy
--
Andy Adiwidjaja
Adiwidjaja Teamworks GmbH // Solutions Consulting
aa at adiwidjaja.com
More information about the Neos
mailing list