Question

I'm new to Orchard CMS and has a question about how to implement displaying nested items in search results.

Let's say I have a content type Box which describes box of books. And I have Book content type. Book content items can be contained in box.

I need to build a page that displays all books grouped by boxes i.e. List of boxes and list of books for them. All in one page.

Not sure what is the best way to implement this.

Thanks

Était-ce utile?

La solution

I would recommend looking into the content picker field. You can attach this to your Box type and then each time you create a box you can select all the books you want to add to your box. You will need to have created all the relevant books before creating your box. You can have a setting on the content picker field so that it only displays certain content types, I suppose in your case it would be the Book content type

David Hayden has a nice introduction to the content picker field, available here: http://www.davidhayden.me/blog/content-picker-has-content-type-filtering-in-orchard-cms

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top