[TYPO3-english] TS: if + select + renderObj. Marker for tt_news items
Sören Kracker
s.kracker at kopfstand-mail.de
Mon Sep 5 16:12:16 CEST 2011
Sometimes you miss the forest for the trees...
isTrue and isInList can't work properly in no way.
This one's working:
newimg = TEXT
newimg {
value = dummy text
if.isInList.field = uid
if.value.stdWrap.cObject = CONTENT
if.value.stdWrap.cObject {
table = tt_news
select {
pidInList = {$pids.newsitems}
orderBy = datetime DESC
max = 2
languageField = sys_language_uid
}
renderObj = TEXT
renderObj {
field = uid
wrap = |,
}
stdWrap.substring = 0,-1
}
}
> Hi,
> I have following typoscript in genericmarkers for tt_news:
>
> newimg = TEXT
> newimg {
> value = dummy text
> if.isInList.field = uid
> if.isTrue.stdWrap.cObject = CONTENT
> if.isTrue.stdWrap.cObject {
> table = tt_news
> select {
> pidInList = {$pids.newsitems}
> orderBy = datetime DESC
> max = 2
> languageField = sys_language_uid
> }
> renderObj = TEXT
> renderObj {
> field = uid
> }
> }
> }
>
> The marker should only be displayed for the 2 newest news.
> What happens is that either the marker shows for every news
> (if.isInList.data = uid) or the marker shows for no news
> (if.isInList.field = uid). I tried many more possibilities but no
> success.
> I have no idea anymore, what I can do...could someone help please?
>
> Besides that: how could I debug typoscript? It would be helpful to
> see, what really happens in those if statements and what renderObj
> returns.
>
> Greetings
>
> Sören
> _______________________________________________
> 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