When creating a conditional display using the Conditional block, how can I set a condition based on the number of records returned by a View block?
For example, I have a slider created with a View block. When there are 2 or more records/posts returned by the view, pagination dots are displayed below the slider. But when there is only 1 record/post returned, the pagination dots do not display. This causes inconsistent spacing between the slider and the content below depending on whether the pagination dots are displayed or not.
So if the slider View only returns 1 record/post, I'd like to use a Conditional block to display an empty container with similar height to the pagination dots therefore keeping a consistent amount of whitespace.
Actually, I just wrapped the pagination block in a container with a min-height setting to maintain consistent spacing. So I guess that solves my immediate problem.
Still, for future reference, I'd love to know how to base a condition on the number of records/posts returned by a View block.
Hello. Thank you for contacting the Toolset support.
You can add a conditional block and select the number of posts returned by view and compare the value. Please check the following screenshot: hidden link