MVC Custom List Module Separate Detail Page

Posted by Community Admin on 04-Aug-2018 23:45

MVC Custom List Module Separate Detail Page

All Replies

Posted by Community Admin on 19-Oct-2015 00:00

Hello,

 I'm currently facing a problem with an MVC custom module. My custom module is a list of links that is designed to send the user to a detail view once they click the link. Currently, the detail view will load on the same page, in the place where the custom module is placed. What I want to do is something similar to what is described here   under "Select existing page..." using the out-of-the-box News and Events modules, and send the user to a different page when they click the links in the list view. 

 The approach I'm currently trying is to circumvent Sitefinity entirely and use MVC routing - that is, create an MVC view in the Sitefinity solution, do a lookup to retrieve the details for the list item that was clicked and build a model object, and return the view with the model that I created. This doesn't work, though; it forces the entire view to be squashed into the page that contains the list widget, in the space that the list widget occupies instead of displaying the view in the entire window. 

Another approach that I've considered is to create a custom template specifically for use with the detail page and create one and only one page that uses the template. Then, I'd use the API to get the page URL and redirect to that page on the back end in code. I am concerned that this approach will suffer from the same issue described above, however. 

Thanks for any help that you can provide.

-Holly 

This thread is closed