[TYPO3-ttnews] AND for selecting categories?

Christian Lerrahn typo3 at penpal4u.net
Sat Feb 11 12:59:25 CET 2006


Hi Christian,
> 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! :-)

I just guessed without doing any research on it. So I might be wrong. I
don't have the time to look into that right now. If I find the time to
check, I will and let you know then.

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
> > 


-- 
    Es sollen viele Völker sich zum Herrn wenden und sollen mein Volk
    sein.
    
    Sacharja 2,15
    
    Abraham hat geglaubt auf Hoffnung, wo nichts zu hoffen war,  dass
    er der Vater vieler Völker werde.
    
    Römer 4,18
    



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