It would be nice if there was also a views count field, which just simply returns the number of results of another view.

Is that something you are willing to put in this module? I'll try to make a patch for it.

Comments

cyberwolf’s picture

Status: Active » Needs review
StatusFileSize
new4.04 KB

And here's a patch (only tested against Views 2 so far so might need some work).

cyberwolf’s picture

StatusFileSize
new2.15 KB

... and also a patch compatible with Drush make

cyberwolf’s picture

StatusFileSize
new4.03 KB

Please ignore the previous file, it contained some other work in progress. Attaching a patch identical to the one in comment #1 for Drush make here.

Alconaft43’s picture

+1 for this feature, good to use it in contemplates.

ikeigenwijs’s picture

subscribe

AndrzejG’s picture

subscribe

gaëlg’s picture

Version: 6.x-1.0-beta1 » 7.x-1.x-dev
StatusFileSize
new5.51 KB

Here's a first try for D7. Only works for default views backend (SQL).

Status: Needs review » Needs work

The last submitted patch, count_subview_results.diff, failed testing.

geek-merlin’s picture

Issue summary: View changes
Status: Needs work » Needs review
StatusFileSize
new2.06 KB

Thanks everyone for getting this ball rolling, this is in fact an important feature.

A downside of the patches before is: It's a 5kb copy-paste-change of existing code.
This is neigher reviewable nor maintainable.

But it inspired me to create a patch that simply adds a "count" option with only a few lines.

I#M happily using this in production.
Please test & set RTBC so we can get this in.

vladimiraus’s picture

Status: Needs review » Closed (outdated)

Thank you for your contributions.
Drupal 7 is no longer supported.
Closing the issue.

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.