[TYPO3-ttnews] AND for selecting categories?

Christian Buelter buelter at kennziffer.com
Thu Feb 9 17:22:26 CET 2006


Hi Christian,
hi Oliver,

Christian: You have a very optimistic view onto that problem.

Now, I found a solution, but it is not very elegant, I think.

I did not find any other way than creating additional MM-Tables for the 
categories as you cannot AND select within one MM-Table. You just will 
not get any results at all.

But if you have a better way to code that, please let me know!

I'm very curious! :-)

Greetings,

Christian

Christian Lerrahn schrieb:
> Hi Christian,
> hi Oliver,
>>> I want to select more than one category in a LIST/LATEST view, but the 
>>> different categories should be AND-connected, so that only news get 
>>> displayed that have ALL of the categories.
>>>
>>> Is there any way to do this?
>>>
>>> Greetings,
>>>
>>> Christian
>> This has been on the wishes list for quite a while now... I would also 
>> very much need such a feature.
>>
>> I must say that I looked at the code and... well it's not obvious at 
>> all, because of the kind of relations. But on the other hand, isn't it 
>> an interseting challenge for our hackers around there?
> 
> That shouldn't be too hard to code. You could just use the hook
> selectConfHook, eliminate the part of the where clause in the array and
> replace it by a new one. If you don't mind making it inefficient you
> could even just add the new clause leaving the old one because they won't
> contradict. Then about 5 lines of code would probably be enough... :-)
> 
> Christian
> 



More information about the TYPO3-project-tt-news mailing list