Skip Navigation

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

This support ticket is created vor 4 Jahre, 10 Monate. 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
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)

This topic contains 4 Antworten, has 2 Stimmen.

Last updated by Christian Cox vor 4 Jahre, 10 Monate.

Assisted by: Christian Cox.

Author
Artikel
#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
hidden link 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?

hidden link
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.

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