Skip Navigation

[Resolved] condition

This support ticket is created 2 years, 7 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.

Our next available supporter will start replying to tickets in about 0.04 hours from now. Thank you for your understanding.

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)

This topic contains 2 replies, has 2 voices.

Last updated by martinP-13 2 years, 7 months ago.

Assisted by: Shane.

Author
Posts
#2346953

please could you advise how i wrap the following in a condition , all my efforts have not been succesful .

<h3>Sire</h3>[wpv-view name="view-3435" ids="[types field='sire-of-dog' output='raw' item='@dog-dog-appearance.parent'][/types]"]<hr>

i need to display the view 3435 if sire-of-dog is set m, if not set i would like to display "no sire" . i cannot seem to find the corrrect condtion acroos the views.
,manythanks

#2346989

Shane
Supporter

Languages: English (English )

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

Hi Martin,

Thank you for getting in touch.

Based on our Documentation.

The correct way to do this can be seen below.

[wpv-conditional if="([types field='sire-of-dog' output='raw' item='@dog-dog-appearance.parent'][/types] eq 'm' )"]
<h3>Sire</h3>[wpv-view name="view-3435" ids="[types field='sire-of-dog' output='raw' item='@dog-dog-appearance.parent'][/types]"]<hr>

[/wpv-conditional]

[wpv-conditional if="([types field='sire-of-dog' output='raw' item='@dog-dog-appearance.parent'][/types] ne 'm' )"]
No Sire

[/wpv-conditional]


Please let me know if the above codes work for you.

Thanks,
Shane

#2347057

My issue is resolved now. Thank you! i had tried that but had made a typo!! thanks for the quick response shane!