Skip Navigation

[Resolved] Adapting my custom tooltip field, to a custom tooltip view?

This support ticket is created 5 years, 10 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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

Tagged: 

This topic contains 17 replies, has 2 voices.

Last updated by CharleneD1435 5 years, 10 months ago.

Assisted by: Nigel.

Author
Posts
#1223337

Not a problem 🙂 Take your time and have a great weekend.

#1223865

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Charlene

I took a closer look and see that the problem is you are trying to use conditional shortcodes where the field value being tested comes from a many-to-many relationship, which the documentation describes is not expected to work: https://toolset.com/documentation/user-guides/conditional-html-output-in-views/conditional-output-based-on-post-relationships/

Comparing to the “Many” side will produce no results because Toolset cannot know which of the many items you want to compare to.

So you cannot insert the condition and specify the relationship, the GUI doesn't let you.

But... I managed to trick it into working by using a different format for testing the Types field. Normally this is inserted as "$(wpcf-my-field)", which will evaluate my-field for the current post.

But you can also provide a full Types shortcode inside single quotes, like this:

if="( '[types field='harmfull_duration' format='FIELD_VALUE' item='@skill-harmfull-effect.intermediary'][/types]' ne '' "

So it is testing the output of the shortcode itself.

Seems to work, if you want to check.

#1223913

Thank you Nigel! That works indeed perfectly 🙂

Well that solves all my Questions for now, just wanted to say I'm very grateful you've been so patient with me and helped me answer all my questions.

Perhaps with your new discovery you can even update the documentation so others might use it as well 🙂

Thanks for everything!