Define a Context by the number of rows in a View

Created on 18 October 2011, over 13 years ago
Updated 18 April 2023, about 2 years ago

The purpose of this is related to my question on DA: http://drupal.stackexchange.com/questions/13417/how-can-i-set-a-view-con...

I would love to be able to set a context based on how many rows a View is returning. For instance in my example, I would like to display all videos attached to a node, unless the current node is not attached to any videos, in which case it would output all videos flagged as global.

This could easily be 2 separate view displays (node_videos and global_videos), and then have Context module set a context based on the number of rows node_videos returns.

EDIT: Also, could this use something related to how VBO hooks into Rules? VBO provides a condition such as "Check the number of results returned by a View"

✨ Feature request
Status

Needs review

Version

3.0

Component

Code

Created by

πŸ‡­πŸ‡°Hong Kong carn1x

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024