Skip Navigation

[Resolved] Condition in view with parameter

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

This topic contains 4 replies, has 2 voices.

Last updated by garenM 2 years, 5 months ago.

Assisted by: Shane.

Author
Posts
#2433501

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

#2433707

Shane
Supporter

Languages: English (English )

Timezone: 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

Languages: English (English )

Timezone: 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!