[TYPO3-english] accessing GET-Parameters in fluid templates

Nicolai Schirawski hinterindien at gmx.net
Wed Dec 5 17:23:26 CET 2012


Thank you. 

I tried it, but didn't work...


Iterestingly this is evaluated to TRUE: <f:if condition="3 == 2">

it comes out correctly, if you map one of the numbers to aliases:
<f:alias map="three:3">
<f:if condition="{three} == 2"> 
this evaluates FALSE, as expected...

Nicolai

-------- Original-Nachricht --------
> Datum: Wed, 5 Dec 2012 16:39:43 +0100
> Von: "Stephen Bungert" <stephenbungert at yahoo.de>
> An: typo3-english at lists.typo3.org
> Betreff: Re: [TYPO3-english] accessing GET-Parameters in fluid templates

> I often use inline notation when I need to use a viehelper's return value
> in 
> a another viewhelper.
> 
> Try this (untested, something like this should work I think):
> 
> <f:if condition="{news.id} == {f:cObject (typoscriptObjectPath: 
> 'path.to.ts')}>
> 
> Stephen
> 
> "Nicolai Schirawski" <hinterindien at gmx.net> schrieb im Newsbeitrag 
> news:mailman.10822.1354721383.598.typo3-english at lists.typo3.org...
> > Hi there,
> >
> > I am searching for a possibility to access the GET-Parameters in my
> fluid 
> > template.
> >
> > What I managed so far: I extracted the GET-Parameter from URL via 
> > typoscript
> > temp = TEXT
> > temp.data = GP:tx_news_pi1|news
> >
> > and could then successfully display this number in my template:
> > <f:cObject typoscriptObjectPath="path.to.ts" />
> >
> > But this seems to lead nowhere. The number is just displayed. But I need
> > to use it in some construction like:
> > <f:if condition="{news.id} == {myGetParameter}">
> >
> > Or am I on the wrong track? Is there some straightforward method to 
> > include a GET-Parameter into fluid templates?
> >
> > Background: I have two ext:news-plugins on the same page, a list-view 
> > showing only the titles of the news, and a detail view. Now I want to 
> > highlight the list element that is shown in the detail view.
> >
> >
> > If someone has a hint for me, where to search, this would be very
> helpful
> >
> > Thanks
> > Nicolai 
> 
> 
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english


More information about the TYPO3-english mailing list