Skip Navigation

[Resolved] Conditional check of relation field in parent page

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

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 3 replies, has 2 voices.

Last updated by matsF 3 years, 1 month ago.

Assisted by: Minesh.

Author
Posts
#1967345

Hi,

about a year ago I got some great help from Toolset support to pick data from a relation field in a parent page.

Here is the thread:
https://toolset.com/forums/topic/parent-post-connections/

The method was to put the shortcode in an content template and create a new shortcode with the "item" attribute. For example, the original shortcode

[types field='tillganglighet' item='@platsinfo.parent'][/types]

put in a Content Template with the slug "shortcode-tillganglighet" would be the new shortcode

[wpv-post-body view_template="shortcode-tillganglighet" item='$parent']

My question is if it's possible to check the "grandparent" field conditionally for an empty field.

To check the same field if it was in the same post would look something like this I think:

[wpv-conditional if="( $(wpcf-tillganglighet).item(@platsinfo.parent) ne '' )"][/wpv-conditional]

But when put in such a new "child" content template/shortcode I'm not sure about the syntax and how to do it.

Help would be appreciated.

Regards Mats

#1967889

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Can you please tell me on what page/post you want to display what field and the field you want to check is belongs to (grandparent/parent/child)?

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#1970201

Hi,
I solved the issue myself. An auto-inserted empty paragraph caused my problem. I switched to Manual paragraph for that Content Template. That made it possible to hide the field.

Regards Mats

#1970207

My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.