[Typo3] Display tt_news_cat of related news in Single view

Hendrick Bosse-Lange mail at hbosse.com
Fri Feb 11 16:05:03 CET 2005


Hi Rupert and Peter,

thanks so much for looking into this. This was definitely way beyond my
current knowledge of TS and sql...
I will build this into my setup and let you know if I get it working!

Best

.h


"Peter Klein" <peter at umloud.dk> schrieb im Newsbeitrag
news:<mailman.1.1108131341.4197.typo3-english at lists.netfielders.de>...
> A more working example..
>
>
> -- cut --
> temp.MMtest = COA
> temp.MMtest {
>
>   10 = CONTENT
>   10.table = tt_news
>   10.select.pidInList = 8  # Uid of the sysfolder where News records are
> stored
>   10.select.where = uid=3 # Uid of an existing News record
>   10.select.andWhere = deleted=0 AND hidden=0
>   10.select.leftjoin = tt_news_cat_mm ON tt_news.uid =
> tt_news_cat_mm.uid_local
>   10.select.groupBy = tt_news_cat_mm.uid_foreign
>   10.renderObj = COA
>   10.renderObj {
>     10 = TEXT
>     10.field = title
>     10.wrap = Title:&nbsp;|<br>
>
>     20 = TEXT
>     20.field = uid_foreign
>     20.wrap = uid_foreign:&nbsp;|<br>
>
>     30 = CONTENT
>     30.table = tt_news_cat
>     30.select.pidInList = 8  # uid of the page
>     30.select.andWhere.field = uid_foreign
>     30.select.andWhere.wrap = uid=|
>     30.renderObj = TEXT
>     30.renderObj.field = title
>     30.renderObj.wrap = Category:&nbsp;|<br>
>
>   }
> }
>
> page.545 < temp.MMtest
> -- cut--
>
> This shows the title of the News article with UID=3, and the category that
> that article belongs to.
>
> Dunno if this is a bug, but in my test setup the News article with UID=3
> belongs to 2 categories (UID=2 & UID=3)
> If I disable the "30 object", I get TWO blocks of output (which is
correct),
> like this:
>
> Title: bla bla news
> uid_foreign: 2
> Title: bla bla news
> uid_foreign: 3
>
> But with the "30 object" enabled, I only get ONE block of output, like
this:
>
> Title: bla bla news
> uid_foreign: 2
> Category: Category 2
>
> Weird!!!
>
> --
> Peter Klein/Umloud Untd





More information about the TYPO3-english mailing list