[TYPO3-english] [SOLVED] Re: TS select with tt_news: get current uid of news-item in LIST
Bert Hiddink [BENDOO e-work solutions]
hiddink at bendoo.nl
Sat Apr 21 09:17:32 CEST 2012
Hi Jigal,
I tried this snipped on another installation:
plugin.tt_news {
genericmarkers {
data=uid
category1=TEXT
category1.field=uid
category1.wrap=Here we would like uid of current news-record: | !
}
}
...and there it worked out-of-the-box!!!
So inally I found out: apparently the extension "genericmarkers" is
included in the core of the tt_news-version as a hook and should not be
installed as a seperate extension...
However, since I was not aware of that, I installed and loaded it from
TER, this mangled the snippet above.
Now this one:
...
LIST {
category1 = CONTENT
category1 {
table = tt_news
select {
selectFields = *
join = tt_news_cat_mm ON (tt_news.uid = tt_news_cat_mm.uid_local )
JOIN tt_news_cat ON (tt_news_cat_mm.uid_foreign=tt_news_cat.uid )
where=tt_news_cat.parent_category=3
andWhere.dataWrap = tt_news.uid = {field:uid}
orderBy = tt_news.uid asc
pidInList = 18
max=3
}
renderObj = TEXT
renderObj.field = title
renderObj.wrap = <p><b>Parent (3)</b>: |</p>
}
}
...
also works as expected!
Thanks again for your help and patience and notes on possible
SQL-injection!!!
Nice weekend!
Bert
On 4/19/12 2:12 PM, Bert Hiddink [BENDOO e-work solutions] wrote:
> Hi Jigal,
>
> Thanks for your reply.
>
> Yes, I had seen that setting, it is with:
> plugin.tt_news.genericmarkers.data = title, uid,category, etc
>
> However, that was set correctly there.
>
> Still struggling with it...
>
> Thanks and regards,
> Bert
>
>
> On 4/19/12 12:29 PM, Jigal van Hemert wrote:
>> Hi,
>>
>> On 19-4-2012 11:53, Bert Hiddink [BENDOO e-work solutions] wrote:
>>> Please have a look at the snippet below. It works almost except that I
>>> can not get printed the uid of the current item in LIST-mode.
>>>
>>> andWhere.dataWrap = tt_news.uid = {field:uid}
>>>
>>> ...gives me the uid of the page and that is obviously not what I want...
>>>
>>> What do I overlook? Any suggestions?
>>
>> You have to set which fields must be available in the genericmarkers
>> section.
>>
>> Please look it up in the manual; it is something like:
>> plugin.tt_news.genericmarkers.fields = uid,title
>>
>> These are then available as {field:uid}, etc.
>>
>
More information about the TYPO3-english
mailing list