Of course the usual method is to generate two loops- one for id_rubrique=74 and another for id_mot=222, the problem is if you want to use only one loop for sorting and pagination purposes.
Is this not possible in SPIP? Help would be greatly appreciated.
Of course the usual method is to generate two loops- one for id_rubrique=74 and another for id_mot=222, the problem is if you want to use only one loop for sorting and pagination purposes.
Is this not possible in SPIP? Help would be greatly appreciated.
Gilles’ suggestion on using the IN criteria does not work for my purposes since {id_mot IN 222,74} ) can only return articles with the keywords 222 or 74. I need to get articles with the section id of 74…
Fil’s solution worked brilliantly though. I would never have thought of it since I didn’t think a negation of the doublons criteria is possible. I don’t think this is in the English documentation of SPIP.
Thanks a lot for all your suggestions! This saved me from doing some messy php coding instead.
your solution, is it mentioned in the doc ? I understand that SPIP stores the values of the doublons in a table / an array which one may examine in a third loop.
Therefore {doublons x} means "get everythin exept the objects in array x" - and {!doublons x} means get exverything in array x - am I right?
in order to obtain an ordered list of sections’s and article’s titles?
No
{doublons} can only store objects of the same type.
Your latest loop will try to create a joint query between spip_articles and spip_rubriques, but won’t work : ‹ titre › is a field that exists in each table and you must precise which on you want to use.
.Gilles
Thank you very much,
klaus++
Fil schrieb:
For example, what if I want to get all articles with a keyword id of 222 plus
those belonging to section 74 (not necessarily with the keyword 222)