[Neos] Inspector drop-down containing media tags

Marcin Ryzycki marcin at ryzycki.com
Sun Jan 19 15:47:28 CET 2014


Hi Mathias,

I'm not exacly sure (yet) how post processors for NodeTypes works, but 
maybe that's the way how to handle it. Something like that:

'Lilio.NodeTypes.Files:List':
  ......
  postprocessors:
    'TagsNodeTypePostprocessor':
      postprocessor: 
'Lilio\NodeTypes\Files\NodeTypePostprocessor\TagsNodeTypePostprocessor'

Have a look at NodeType TYPO3.Neos:Plugin and its postprocessor 
TYPO3\Neos\NodeTypePostprocessor\PluginNodeTypePostprocessor

Just fill up $configuration param there with your items for the tag 
property (in case of doubt how the $configuration is exacly structured, 
\TYPO3\Flow\var_dump() will help you ;-)

M.


On 2014-01-14 11:55:56 am +0000, Mathias Bolt Lesniak, LiliO Design said:

> I wonder if someone can give me a kick in the right direction.
> 
> I am trying to make a custom content element for listing media files 
> connected to a particular tag. To do this I would like to have a 
> property called “tag” displayed as a drop-down menu (select box) in the 
> Inspector UI in Neos. The new content element type can be inserted on a 
> page, but there it stops.
> 
> My NodeTypes.yaml file looks like below, and (apart from that this is 
> obviously wrong, as nothing appears in the Inspector) I wonder how to 
> populate the menu with the tags. I guess there’s maybe bit of 
> JavaScript needed?
> 
> ****
> 'Lilio.NodeTypes.Files:List':
>   superTypes: ['TYPO3.Neos:Content']
>   ui:
>     label: 'File List'
>     inspector:
>       groups:
>         tag:
>           label: 'Tag'
>           position: 5
>   properties:
>     tag:
>       type: TYPO3\Media\Domain\Model\Tag
>       ui:
>         label: 'Tag'
>         reloadIfChanged: TRUE
>         inspector:
>           editor: TYPO3.Neos/Inspector/Editors/SelectBoxEditor
>           group: 'tag'
> ****


-- 
Marcin Ryzycki
Certified TYPO3 Integrator (2009)

http://million12.com/
https://plus.google.com/+MarcinRyzycki12/



More information about the Neos mailing list