Skip Navigation

[Resolved] build a index list displaying the parent child relation with sub ULs

This thread is resolved. Here is a description of the problem and solution.

Problem:

I just want to know if it is possible to display the view "Wiki Index" in a hyrarchical lists based on parent child relation.

Solution:

You need to setup a nested view, for example:

https://toolset.com/forums/topic/build-a-index-list-displaying-the-parent-child-relation-with-sub-uls/#post-1829379

Relevant Documentation:

This support ticket is created 4 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.

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)

This topic contains 8 replies, has 2 voices.

Last updated by TorstenR3514 4 years, 1 month ago.

Assisted by: Luo Yang.

Author
Posts
#1826917

Hi I just realized that I can use the parent child relation to easily build wikis with toolset. I am fine with displaying the child posts of parent at the bottom of parent single page. Awesome!

My question is if there is an easy way to build a index list displaying the parent child relation with sub ULs. I am working with blocks!

see: hidden link

#1828037
list.JPG

Hello,

Please elaborate the question with more details:
index list displaying the parent child relation with sub ULs
What kind of sub ULs do you want?

Within Toolset Blocks plugin, in single parent post, you can setup a view block to retrieve related child posts:
https://toolset.com/course-lesson/displaying-related-posts/#displaying-many-related-items

And you can choose different Loop Style, for example unordered list, see my screenshot list.JPG

It should be able to work in nested view too.

#1828273
Screen-parent-child-hierarchy-in-vie-listing.jpg
Screen-parent-child-no-hierarchy-in-vie-listing.jpg

Hello Luo Yang,

thx for your reply!

"Within Toolset Blocks plugin, in single parent post, you can setup a view block to retrieve related child"

I think I am allready doing this, see:
Child Posts of “Basics WordPress“:
hidden link
That's all fine

My Problem is the Listing "Wiki Index" which has no parent-child hierarchy right now (See screen). It should look like the other screenshot.
hidden link

I also have a problem with ordering settings. Sorting by menu order 2.2 is placed over 2.1.1, and 2.1.1.1

it is:
2.
2.1.
2.2.
2.1.1.
2.1.1.1.

it should be:
2.
2.1.
2.1.1.
2.1.1.1.
2.2
...

Added the Numbers just for presentation, so sorting by title is no option

#1829159

Please provide detail steps to duplicate the same problem.

Are you using a hierarchy post type?
How do you setup the post views?
How do you setup the menu order in each post?

I need to test it in my localhost, thanks

#1829367
Screen-wikis-backend.png

"Please provide detail steps to duplicate the same problem."
It's not a problem. It's the question if it is possible to display a hyrarchical lists based on parent child relation

"Are you using a hierarchy post type?"
yes

"How do you setup the post views?
How do you setup the menu order in each post?"
I changed the order setting of the view "Wiki Top Level" at hidden link and "Wiki Childs of Parent" on the single post template to "menu order", so now they are displaying in the right order.

But this is not my request. I just want to know if it is possible to display the view "Wiki Index" in a hyrarchical lists based on parent child relation.

So i get:

<ul>
<li></li>
<li></li>
</ul>

I want it like a menu struktur, with sub menues for the child's

<ul>
 <li>
  <ul>
   <li>
  </ul>
 </li>
</ul>

I can give you access to backend, maybe this is the easiest way.

#1829379
top-level.JPG

You need to setup a nested view, for example:
1) Parent post view:
- Query Wiki posts
- Filter by:
Select top-level posts with no parent.
see my screenshot top-level.JPG
- in view's loop, display post link + below child post view

2) Child post view
- Query Wiki posts
- Filter by:
Select posts whose parent is the current post in the loop.
- in view's loop, display post link

#1829505

nested views? "Nested views creation is not supported at the moment"

#1831673

You can setup the nested view with classic editor:
1) Dashboard-> Toolset-> Settings-> General:
in section "Editing experience", enable option: Show both the legacy and Blocks interface and let me choose which to use for each item I build

2) Dashboard-> Toolset-> Views, setup the parent and child views, and test again

#1832557

Ok so I'll try the oldschool way. Actually I don't need support anymore. thx