开发者

How to add a conditional filter for drupal's view?

开发者 https://www.devze.com 2023-01-01 17:05 出处:网络
Only apply the filter when there is filter=1 in the query string, has 开发者_如何转开发anyone managed to do this kind of conditional filter with drupal?For some reason I think there\'s something wron

Only apply the filter when there is filter=1 in the query string,

has 开发者_如何转开发anyone managed to do this kind of conditional filter with drupal?


For some reason I think there's something wrong with your approach, but since there's no specifics, I can't really give my opinion.

Answering your question: you can try implementing hook_views_query_alter(), testing if the parameter filter equals 1 and, if so, removing the condition added by the filter.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号