Tell a module instance to not change views with URL

Feb 21, 2016 at 1:51 PM

I'd like to have a page with a list of Categories/Areas on the side that are used by articles listed in the main module. I've got it so that the main module works nicely - it shows a list and then loads a "Detail" view when an article is clicked.

The problem is that, when we go to "Details" the side module changes as well. But, I'd like that to stay as a "Menu" of sorts of the categories.

Is there a way to tell a module instance to be "fixed" to a given view and ignore the URL parameter?

Feb 24, 2016 at 11:27 AM
This is a funny, but I admit realistic issue - never thought of it :)

I guess you have various options, but the easiest is to do view-switching "manually" so using code and @RenderPage(sub-view) or if(isList) { list template } else { details template }
instead of using the built-in view-switching functionality.
Feb 25, 2016 at 4:35 AM
Thanks for the reply.

Yeah, I ended up getting around this by just using separate pages. Of course, that's less elegant. I basically made a "detail" page and then didn't use the URLs. It would be a nice feature to add.

Actually though, this seems like something that is probably better as a module setting rather than a view setting. I suspect that this would be nice to change by module instance, and so it might belong best there.