fluid - Render node in Neos -


i downloaded lelesys.plugin.slideshow plugin project. introduces 2 nodetype prototypes:

prototype(lelesys.plugin.slideshow:slideshowcontainer) < prototype(typo3.neos:content) prototype(lelesys.plugin.slideshow:slideshowcontainer) {   templatepath = 'resource://lelesys.plugin.slideshow/private/templates/typoscript/slideshowcontainer.html'   slideshowcontainercollection = ${q(node).children('slideshowcontainer').children('[instanceof typo3.neos.nodetypes:image]')}   slideshowcontaineritemcollection = typo3.neos:contentcollection   slideshowcontaineritemcollection {     nodepath = 'slideshowcontainer'   }   properties = ${node.properties} }  prototype(lelesys.plugin.slideshow:slideshowitem) < prototype(typo3.neos.nodetypes:image) prototype(lelesys.plugin.slideshow:slideshowitem) {   templatepath = 'resource://lelesys.plugin.slideshow/private/templates/typoscript/slideshowitem.html'   slideshowcontainerproperty = ${q(node).property('_parent.parent.properties')}   sliderimagetitle = ${q(node).property('sliderimagetitle')}   sliderimagedescription = ${q(node).property('sliderimagedescription')} } 

as can see, comes predefined templates. replaced own. in template slideshowcontainer, have situation:

<f:if condition="{slideshowcontainercollection -> f:count()}>1">   <f:then>     <f:for each="{slideshowcontainercollection}" as="slideitem" iteration="slideitemiterator">       <media:image image="{slideitem.properties.image}" alt="test" /> 

this best managed now, use typo3.media imageviewhelper render image inside slideshowitem, inherits typo3.neos.nodetypes:image.

the normal implementation this:

{slideshowcontaineritemcollection -> f:format.raw()} 

this takes contentcollection neos , renders completely, using template slideshowitem, supposed to.

now, since slideshowitem node type associated template, figure there must straight forward way render slideshowitem nodes simple command, automatically taking account configured template. like:

<f:render node="{slideitem}"> 

that fantasy, there should way render single nodes when easy neos automatically generate output of whole collection of nodes.

my understanding of node system , fluid engine quite of novice. closest thing want?

i not sure, think can accomplish following typoscript

myrenderingofanitem = lelesys.plugin.slideshow:slideshowitem {   //custom modifications rendering } 

use ts:render viewhelper inside f:for loop

<ts:render path="myrenderingofanitem" context="{node: slideitem}" /> 

remember import ts namespace in fluid template

{namespace ts=typo3\typoscript\viewhelpers} 

Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -