Skip Navigation

[Resuelto] This “nesting of contexts” allows us to display related posts as deep as we want

This support ticket is created hace 4 años, 11 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
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)

Este tema contiene 4 respuestas, tiene 2 mensajes.

Última actualización por Christian Cox hace 4 años, 11 meses.

Asistido por: Christian Cox.

Autor
Mensajes
#1273749

Tell us what you are trying to do?

I have 4 post types
AUFGABE related to SCHRITT related to SZENARIO related to HANDLUNGSFELD

Is there any documentation that you are following?

I created a view following
https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/displaying-fields-of-grandparents/

this works fine
enlace oculto for AUFGABE related to SCHRITT related to SZENARIO

in the tutorial it says
This “nesting of contexts” allows us to display related posts as deep as we want to.

but I don't know how to display the related HANDLUNGSFELD in the AUFGABE-view

Is there a similar example that we can see?

[wpv-post-body view_template="szenario-in-aufgaben"][wpv-layout-start]
[wpv-items-found]
<!-- wpv-loop-start -->
<ul class="wpv-loop js-wpv-loop">
<wpv-loop>
<table class="struktur_meta"><tr>
<td rowspan="2" width="50"></td><td>Handlungsfeld<br>
[wpv-post-body item="@schritt-aufgabe.grandparent" view_template="handlungsfeld-in-aufgaben"]</td><td>
Szenario<br> [wpv-post-body item="@schritt-aufgabe.parent" view_template="szeario-in-aufgaben"]</td><td>
Schritt<br> [wpv-post-link item="@schritt-aufgabe.parent"]</td></tr><tr><td colspan="3">
[wpv-post-title]</td></tr></table>
</wpv-loop>

<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-no-items-found]
[wpml-string context="wpv-views"]No items found[/wpml-string]
[/wpv-no-items-found]
[wpv-layout-end]

slug of SZENARIO to HANDLUNGSFELD relation is handlungsfeld-szenario

What is the link to your site?

enlace oculto
username: developer
PW: 5l&JkrHWYMXXeYT(Qo!4YKRz

View used is aufgaben-in-ger-kompetenzen

#1273759

You can nest Content Templates inside one another to access great-grandparent information. I will be glad to take a closer look, but the login credentials don't seem to work for me.

Content Template 1: aufgabe-shritt.parent
Content Template 2: shritt-szenario.parent
Content Template 3: handlungsfeld-szenario.parent

#1273785
Screen Shot 2019-06-20 at 1.46.53 PM.png

Okay I made a change in the Sezario in Aufgaben template so the Handlungsfelder is appearing now. You can see how this nesting works. I would duplicate the Sezario in Aufgaben template and place it in the Handlungsfelder section like this:

Handlungsfelder<br> [wpv-post-body item="@schritt-aufgabe.parent" view_template="szeario-in-aufgaben-duplicate"]</td>

Then you can delete the Handlungsfelder information from the original sezario in aufgaben template, and delete the Sezario information from the duplicate template.

#1273795

Hi

OK, I see, that seems to work. I have to rethink how to achieve the layout, beccause I have to nest this as well I think, but I''ll manage.

Thanks.

I have another question for the same site, but I'll open a new support ticket.

Marcel

#1273799

Okay great.

Este ticket ya está cerrado. Si eres cliente de Toolset y necesitas ayuda relacionada, abre un nuevo ticket de soporte.