This project is read-only.

Display two content itemes based on selected menu item

Topics: Customizing Orchard, Writing themes
Mar 26, 2014 at 10:37 AM
Edited Mar 26, 2014 at 10:58 AM

I'm writing my second template for a website based on orchard.
So I'm currently not very familiar with Orchard.

I have a layout with 3 zones.
"1st level navigation"-Zone: contains a menu widget which only displays the first hierarchie of the menu.
"content"-Zone: displays the content.
"2nd level navigation"-Zone: contains a menu widget which only displays the second hierarchie of the menu.

That works fine.

Now, my customer desired to extend the menu with a third hierarchie and as well as additional content.
The additional content and the third level menu shall be displayed between the current content zone and the second level navigation zone.

The content of the second level navigation and the third level navigation level shall be displayed at the same time.
My problem is, i don't know how i can display two different content items.

What is the way to implement this requirement?

I'm using Orchard 1.7.2.


Mar 26, 2014 at 2:43 PM
You can do this with widgets and layers.
First you create the menus in the Navigation.
Then Go to widgets and create the layers where you want to place the menus (in there you can set a layer rule, it´s like a url filter, that will make the layer and corresponding widgets visible or not).
Then in the layers you created you can add menu widgets.
Mar 28, 2014 at 2:00 PM
Thank you ndurate for your response.
Yes i know that. To place the navigation in different zones works fine.

But additionally, i have to display two content items in different zones.
If I select a menu item in the third level, i want to display the linked content item in a zone and the content item of the parent menu item in a different zone.
That's the point, where i get trouble.
Mar 28, 2014 at 6:48 PM
Edited Mar 28, 2014 at 6:48 PM
If you want to display a content item related to another, you could use a contentpicker field in the parent content type, and the use to dispatch into a specific zone
Mar 31, 2014 at 10:50 AM
Hello nduarte

Yes, some content items are related to other, so I took a look on the parts container and containable.

I'm trying this:

A content item can have 0-8 related content items.
The visitor shall be able to select a related item, then the content item and the related content item shall be displayed.