[Typo3] Display tt_news_cat of related news in Single view

JoH info at cybercraft.de
Sat Feb 12 01:16:57 CET 2005


> I guess I am almost there, but there is one (hopefully) last problem.
> While it is easy to get the related news uid with:
>
>   plugin.tt_news.getRelatedCObject.10.default.20.field = uid
>
> I can't figure out how to pass it to  10.select.where = uid=75
> instead of the hardcoded 75 in the snippet below. It feels like I am
> missing an essential piece of TS understanding here...

Well - you can't pass it to "where" - but you can make "andWhere" a
"cObject" instead ...

andWhere.cObject = TEXT
andWhere.cObject {
field = uid
wrap = deleted=0 AND hidden=0 AND uid=|
}

or you could even make it a COA and fill in different values:

andWhere.cObject = COA
andWhere.cObject {
10 = TEXT
10.value = deleted=0 AND hidden=0
20 = TEXT
20.field = uid
20.noTrimWrap = | AND uid=||
30 = TEXT
30.field = whatever
30.noTrimWrap = | AND whatever=||
}

You need the "noTrimWrap" here to preserve the spaces so that it will give
you
deleted=0 AND hidden=0 AND uid=uid AND whatever=whatever
in one line.

Have a look at stdWrap in TSref. This will open the door to lots of
possibilities for you.
Or even better: Try ObTS (Object oriented TS) which will open a stargate to
another TS galaxy ;-)

Joey





More information about the TYPO3-english mailing list