I have drupal view for displaying our classes, we need to print in each row the number of students in each class.
Is this applicable in drupal view?
[class name] [desc.] [No. of students]
class1 class1 desc 40
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This kind of view can be created with combination of Nodereference Count and References modules.
First you need to download and enable these two modules.
Create a node reference field in student content type which refers to class node.
Now in class content type create ‘No. of students’ field with ‘Node reference count’ field type to store count of node references in student content type which you will select while configuring this node reference count field.
Now in your view of class content type you can add ‘No. of students’ field to show number of students which were refereed to this class.
But this will not work of existing nodes as you have to update these nodes individually or by Views Bulk Operations (VBO) module.