Skip Navigation

[Resolved] Condition based on nested view

This support ticket is created 4 years, 8 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Tagged: 

This topic contains 1 reply, has 2 voices.

Last updated by Shane 4 years, 8 months ago.

Assisted by: Shane.

Author
Posts
#1542019

Hi,
I want to put a conditional statement based on the nested view. Like I want to display a Text line "There is no such restriction" depending on the nested view called '[wpv-view name="exam-attempt-restrictions"]' when there is no data in the view or it is blank. How to do that? Thanks.

#1542475

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Deep,

Thank you for getting in touch. There isn't a way to add a view to a conditional, however when a view doesn't return any results there is a section on your view that displays. See example below.

[wpv-no-items-found]
		<div class="no-jobs-found"><strong>[wpml-string context="wpv-views"]No Jobs found for this user.[/wpml-string]</strong></div>
	[/wpv-no-items-found]

What you can do is to make use of the [wpv-no-items-found] section to display what you want to display.

Thanks,
Shane