Sauter la navigation

[Résolu] Condition in view with parameter

This support ticket is created Il y a 2 années et 9 mois. 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)

Ce sujet contient 4 réponses, a 2 voix.

Dernière mise à jour par garenM Il y a 2 années et 9 mois.

Assisté par: Shane.

Auteur
Publications
#2433501

Hey, there is a way to add this item='$current_page' on a conditional output on views?

#2433707

Shane
Supporter

Les langues: Anglais (English )

Fuseau horaire: America/Jamaica (GMT-05:00)

Hi Garen,

Thank you for getting in touch.

The $current_page only works with our Types and Views shortcodes, so it is possible to add this to your conditional but you must also be using it with a Types or a Views shortcode.

Please let me know if this provides some clarity for you.
Thanks,
Shane

#2434123

Hey I have this [wpv-conditional if="( $(wpcf-pdf-download-link item='$current_page') ne '' )"] but isnt working. Can you please advise.

#2434373

Shane
Supporter

Les langues: Anglais (English )

Fuseau horaire: America/Jamaica (GMT-05:00)

Hi Garen,

It won't work in this fashion, you will need to get the custom field value by using the Types shortcode in order to use the $current_page parameter like this below.

[wpv-conditional if="('[types field='pdf-download-link ' item='$current_page'][/types]'ne '' )"] 

Thanks,
Shane

#2435033

My issue is resolved now. Thank you!