Best Practice? How to do Master / Detail Widgets in Sitefini

Posted by Community Admin on 03-Aug-2018 18:00

Best Practice? How to do Master / Detail Widgets in Sitefinity

All Replies

Posted by Community Admin on 15-Feb-2011 00:00

I'm trying to figure out a good way to integrate a custom widget with master/detail views into a Sitefinity page. (for example: a list of store locations (master) & full location detail (details))

In the end, I would like visitors to be able to bookmark a specific location's URL. Therefore, a combined master/detail widget that uses AJAX for navigation may not work. So how would you construct this type of widget in Sitefinity?

1. Setup two (or more) Sitefinity pages: master widget on one, detail page on other(s) - pass id through url param? Other means?

2. One Sitefinity page, widget with master/detail combined, switch using AJAX? (Can the URL be bookmarked? indexed?)

3. One Sitefinity page, widget with master/detail combined, switch using url param? id in url path? other?

4. Other method?

Thank you for your feedback.

Posted by Community Admin on 21-Feb-2011 00:00

Hello Dan Sorensen,

I would go for option 2 or 3. The advantage of option 3 is that it can be eventually crawled by search engines, since all master's will have unique url-s. Option 2 can also provide unique url with the unique  part in the url hash number, but this is not crawlable. In this case you will have to load the details on the client side load event of the page. The advantage of option 2 is that your widget can be entirely based on web-service and client side data binding, and so the page will not reload from server - which can result in better and faster user experience. If you still need full-text search I think it is possible in theory to tweak our Sitefinity search indexing to work with hashes or maybe more simple way is to tweak the search results control to return hashes rather than urls.

Nikolay Datchev
the Telerik team

Posted by Community Admin on 10-Jun-2013 00:00

Hi Nikolay Datchev,

Can you share some sample code how to achieve this?

Thanks!

Posted by Community Admin on 11-Jun-2013 00:00

Hello Alex,

Options 1 and 3 are already implemented in Sitefinity and you can use them out of the box. You can use the Module builder to create a dynamic module with type Store and drop its widget to a page. In this way you will achieve option 3. If you need different pages for master and details view (option 1) you need to configure your widget to use different page for a detail view (Single Item Settings tab ->  Select existing page…). The both options can be achieved without a single line of custom code. If you need some custom logic you can map external templates and place there your custom code.

According to option 2 you will need custom development to implement web service invocation and partial rendering.

I hope this information would be helpful for you. Please do not hesitate to contact me again if you need any further details.

Regards,
Georgi Dimitrov
Telerik

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed