Problem: I would like to use a conditional to test the output of a Content Template using a post ID from a custom field in the current post. It may be empty or it may have some content. I would like to be able to test that value with conditional HTML, but it's not working as expected.
Solution: If you exceed the maximum nesting depth level, the conditional engine will have problems deciphering the sequence of nested quotation marks. Usually the best practice here is to create a custom shortcode that does not require so many nested attributes and shortcodes.
Relevant Documentation:
https://toolset.com/documentation/user-guides/conditional-html-output-in-views/using-custom-functions-in-conditions/#checking-for-empty-post-content
https://toolset.com/documentation/user-guides/conditional-html-output-in-views/using-shortcodes-in-conditions/
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 |
---|---|---|---|---|---|---|
8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | - | - |
13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | - | - |
Supporter timezone: America/New_York (GMT-04:00)
This topic contains 2 replies, has 2 voices.
Last updated by 5 years, 7 months ago.
Assisted by: Christian Cox.