Skip Navigation

[Resuelto] Split: How to delete the relationship from the view

This support ticket is created hace 3 años, 5 meses. 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.

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Karachi (GMT+05:00)

Este tema contiene 1 respuesta, tiene 1 mensaje.

Última actualización por KonstantinS88 hace 3 años, 5 meses.

Asistido por: Waqar.

Autor
Mensajes
#2103095

Thanks, as I understand I can still come around the limitations. Your idea is similar to what I use at the moment. Works so far:

- I have created a view for the nfc-chips and added relationship forms which works fine.
- I can now create relationships for the nfc-chips and connect them to the vcards in the frontend.

Unfortunately, toolset does not yet have an option to "edit" a relationship. Only to edit the metadata attached to a relationship. Therefore, I need to disconnect a relationship to be able to assign them to a different vcard.

Still, when I insert a "delete relationship shortcode" in the view for the nfc-chips nothing is rendered.

    [cred-delete-relationship role_items='$fromViews' relationship='profil-nfc-chip']Delete this relationship[/cred-delete-relationship]

See this link: enlace oculto

(I have renamed the vcard cpt to profile cpt)

#2103103

I found a solution in this post: https://toolset.com/forums/topic/i-am-trying-to-delete-the-relationship-using-this-code/

Had to create a child view with a "Query Filter" set to "Filter by post relationship or repeatable fields group owner" and select "items in the 'Profile NFC-Chips' relationship" as related items of "The current post in the loop".

Also I needed a "Post status filter" to "Select posts with status of publish or draft."

Still the linked documentation in the mentioned post is missing. https://toolset.com/documentation/post-relationships/how-to-build-front-end-forms-for-connecting-posts/editing-existing-connections-between-related-posts/#deleting-existing-connections-between-posts

The shortcode "cred-delete-relationship" is rather complicated to use and not documentation available afaik.