Skip Navigation

[Resuelto] Showing a view within a content template

This support ticket is created hace 5 años. 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/Hong_Kong (GMT+08:00)

Este tema contiene 7 respuestas, tiene 2 mensajes.

Última actualización por Luo Yang hace 5 años.

Asistido por: Luo Yang.

Autor
Mensajes
#1381619
Screen Shot 2019-11-12 at 8.58.39 PM.png

Tell us what you are trying to do?
Adding Edit function to a Drama title
Show Content Template while in Editing mode
Cast section in "drama" template is not showing correctly--shows "not found" error.
enlace oculto

Also trying to add the same "edit cast" feature to movie and special types but "edit" link isn't showing. I'm following the same set-up as the "drama" type.

Is there any documentation that you are following?
https://toolset.com/documentation/post-relationships/how-to-build-front-end-forms-for-connecting-posts/editing-existing-connections-between-related-posts/

Is there a similar example that we can see?
enlace oculto

What is the link to your site?
enlace oculto
enlace oculto
enlace oculto

Original tickets:
https://toolset.com/forums/topic/edit-remove-connection-not-working-as-expected/
https://toolset.com/forums/topic/relationship-edit-link-duplicated/#post-1381617

What is the link to your site?
enlace oculto

#1381735

Hello,

I can see the problem you mentioned above in URL:
enlace oculto

And the credentials you provided in previous thread was removed to protect your privacy:
https://toolset.com/forums/topic/edit-remove-connection-not-working-as-expected/#post-1360557

In order to debug this issue, please provide your website credentials or a copy of your website in below private message box, I need to test and debug it in a live website, thanks
https://toolset.com/faq/provide-supporters-copy-site/

#1382697

Thanks for the details, I can log into your website, the problem URL:
enlace oculto

It is a single "Cast Intermediary Post", I assume you are going to display the related "Dramas" post, I have done below modification in your website:
Edit post view "List of Drama Credits":
enlace oculto

In section "Content Selection", choose post type "Dramas" instead of "Cast Intermediary Post".

Please test again, check if it is fixed.

More help:
https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/#displaying-many-related-items
Displaying many related items

#1382735
Screen Shot 2019-11-13 at 9.46.11 PM.png

Thanks for checking Luo.

This is not the desired output.
Now drama titles show nothing under "cast" as shown in the screenshot.

#1382747
Screen Shot 2019-11-13 at 9.50.01 PM.png

This is how the page should look.
For editing existing cast, I want a combination of this attachment and the "edit cast" portion from the first post of this thread.

#1382759

It seems that you are using nested view, I have done below modifications in your website:
In section "Query Filter", change the filter from:
Select posts in Any relationship that are related to the Post where this View is shown.

To:
Select posts in Any relationship that are a related to the current post in the loop.

Test it in front-end:
enlace oculto

I can see it works fine.

#1382783

Thanks Luo!
This "editing" part is semi-working now, but as an adverse effect, when I click the "Cancel" link or the "Submit" button on this screen, it doesn't send the user back to the normal "drama" post page.

It was sending users back to the normal "drama" post before this change: enlace oculto

Users are now being redirected back to this page: enlace oculto

Can you help check?

#1382963

Thanks for the details,

A) "Submit" button:

please check these, edit the relationship form "Edit Drama Cast":
enlace oculto
in section "Settings", you are using option After visitors submit this form: Redirect back to the page from which the user came from

So the correct steps for submit button are:
1) Go to a single "drama" post, for example:
enlace oculto
in section "Cast", find any item, and click "Edit" link, for example:
enlace oculto

2) In section "Editing Cast", click submit button, then it will redirect you back to single "drama" post:
enlace oculto

B) "Cancel" button
Since URL enlace oculto is a single intermediate post, and you are going to redirect user to related "drama" post, you can setup a link with HTML codes, I have setup a demo in your website:
relationship form "Edit Drama Cast":
enlace oculto
in section "Form editor", the last row, with below HTML codes:

<a onclick="return confirm("You will be redirected, do you want to proceed?")" href="[wpv-post-url item="@cast.parent"]">Cancel link with HTML codes</a>

Please test again, check if it is what you want. Thanks