UserList topicTree filtering
Permalink
Hi,
I cannot apply 2 topic tree filters on a user list.
UserList->filterByTopicTreeA(something)
UserList->filterByTopicTreeB(something)
They both work but separately. When I combine them I get an empty UserList. I'm stuck... would a sql custom query would save me.
Thanks !!!
I cannot apply 2 topic tree filters on a user list.
UserList->filterByTopicTreeA(something)
UserList->filterByTopicTreeB(something)
They both work but separately. When I combine them I get an empty UserList. I'm stuck... would a sql custom query would save me.
Thanks !!!
Thanks Shahroq
I think you misunderstood. I don't want to filter on multiple tree nodes, but multiple trees.
I have 2 topic trees: color and size.
and created 2 user attributes color and size.
I can filter them well
userList->filterByAttribute('color', 9); //blue
userList->filterByAttribute('size', 17); //small
Both works, but separately, when I combine them I got an empty result, despite some users do have both values.
I'm stuck ! Custom SQL is a nightmare.
Thanks for your help
I think you misunderstood. I don't want to filter on multiple tree nodes, but multiple trees.
I have 2 topic trees: color and size.
and created 2 user attributes color and size.
I can filter them well
userList->filterByAttribute('color', 9); //blue
userList->filterByAttribute('size', 17); //small
Both works, but separately, when I combine them I got an empty result, despite some users do have both values.
I'm stuck ! Custom SQL is a nightmare.
Thanks for your help
You can either send your selected nodes as an array or send the parent category:
To find out more about filtering methods check the 'Filter a user list' sections of this cheat sheet. There is a samples for each type of atribute in that section:
https://github.com/shahroq/whale_c5_cheat_sheet#filter-a-user-list...