[Neos] Help with some typoscript

Nick nick at jamalade.com
Tue Feb 4 21:09:28 CET 2014


On 04/02/2014 18:12, Pankaj Lele wrote:
Hi Aske & Pankaj

First thanks for the fluid format advice, once I get this teaser working it will be great help :)

But having tried Aske's  i.e. specifying the property I still get nothing even though its pointing to a node that has a Headline and Text.

so if i try:

     teaserTargetNode = ${q(node).property('teaserTargetNode')}
     teaserHeadline = ${q(teaserTargetNode).children('column0').children('[instanceof TYPO3.Neos.NodeTypes:Headline]').first().property('title')}
     teaserText= ${q(teaserTargetNode).children('column0').children('[instanceof TYPO3.Neos.NodeTypes:Text]').first().property('text')}

both teaserHeadline and teaserText are NULL (empty)

when i dump teaserTargetNode in my fluid template I get this :

Node /sites/rerootsitecom/what-we-do/for-you/main/node52e907b4a56fe[Reroot.RerootSiteCom:Section]

if I modify the above with a call to get() or get(0) eg.
     teaserHeadline = ${q(teaserTargetNode).children('column0').children('[instanceof TYPO3.Neos.NodeTypes:Headline]').first().get().property('title')}

this exception is raised.

Failed to render element
page<TYPO3.Neos:Page>/
body<TYPO3.TypoScript:Template>/
content/
main<TYPO3.Neos:PrimaryContent>/
default<TYPO3.TypoScript:Matcher>/
element<TYPO3.Neos:ContentCollection>/
itemRenderer<TYPO3.Neos:ContentCase>/
default<TYPO3.TypoScript:Matcher>/
element<TYPO3.Neos.NodeTypes:TwoColumn>/
columns<TYPO3.TypoScript:Collection>/
itemRenderer<TYPO3.Neos.NodeTypes:MultiColumnItem>/
columnContent<TYPO3.Neos:ContentCollection>/
itemRenderer<TYPO3.Neos:ContentCase>/
default<TYPO3.TypoScript:Matcher>/
element<Reroot.RerootSiteCom:SectionTeaser>
Method "get" is not callable in untrusted context (20140204193035d0831d)

Looking at Pankaj's comment I have also tried this:

     teaserHeadline = ${q(node).property('teaserTargetNode').children('column0').children('[instanceof 
TYPO3.Neos.NodeTypes:Headline]').first().property('title')}

but then I get this exception:
Failed to render element
page<TYPO3.Neos:Page>/
...
element<Reroot.RerootSiteCom:SectionTeaser>
Method "children" is not callable in untrusted context (2014020419404911c637)


So I am a confused as how to proceed or to what I may be doing wrong. Perhaps my assumption is wrong that you can query node types as I am trying?

Many thanks again in advance :)

Nick





> Hi Aske,
>
>> teaserHeadline = ${q(teaserTargetNode).children('column0').children('[instanceof TYPO3.Neos.NodeTypes:Headline]').first().get(0).property(’title’)}
>> or without the .get(0) can’t remember
>
> Is q(teaserTargetNode) possible that easily?  A new context variable introduced with teaserTargetNode = ${q(node).property('teaserTargetNode')} so
> simply? If so then I missed it somehow ;)
>
> Maybe that's the reason why Nick get it always empty?
>
> -Pankaj
>



More information about the Neos mailing list