Question

I have a simple Forums module and a sub-menu (has five options) that belongs to the Forums module. I'm using the default Orchard theme (ThemeMachine) and I placed the sub-menu in the AsideFirst zone on a custom layer.

So, when I click on a "Forums" link in the main menu, I have the Forums sub-menu in the AsideFirst zone and all the forum threads in the Content zone.

The only problem is, when I click on one of the sub-menu options, I would like it to only fresh the Content zone with corresponding threads. Instead, now it is refreshing the entire area below the main menu and the two zones (AsideFirst and Content) get merged when any of the sub-menu options is clicked.

Is there a way I can modify the behavior without having to modify the source code?

EDIT: I get the sense that I might have to modify the source code after all. So, any insights in that regard will be very helpful, too.

Was it helpful?

Solution

I am not sure if this is the best way or even the right way of implementing the behavior I described in my question but it achieved what I intended so I will just post it as an answer:

I converted all the sub-menu items to "custom links" and assigned a url for each of the areas (e.g., menu item "discussion" would have the url ~/forums/discussion and so on).

As for the Forums layer, I added a rule that reads url("~/forums*").

Lastly, I added the sub-menu (or the custom links I mentioned above) to one of the desired zones (LeftContent in my case) in the Forums layer. Now the sub-menu assigned to a zone in the Forums layer sticks and choosing any of the sub-menu items only refreshes the Content zone.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top