简体   繁体   中英

Drupal 7 selection rules based on comments

I want to create panel view based on comment. I there is any comment i want to disable comment for, and when there are no comment related to node i want to display comment form.

I want to do it via selection rules but I don't see any selection rules regarding to comments. I also try php visibility rule

if(%node:comment-count-new ==0)return false;

Still not working any one can help ?

My guess is that since you're writing php, you could just find out the count yourself, ex. https://drupal.stackexchange.com/questions/8582/how-to-show-node-comment-count-in-node-tpl

And if you want to find out the parameter from URL, ex. the current node id, use arg(1).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM