Skip Navigation

[Resolved] Condition based on nested view

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.

Tagged: 

This topic contains 1 reply, has 2 voices.

Last updated by Shane 6 months, 2 weeks ago.

Assigned support staff: 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