More in this section

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

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

4 posts, 1 answered
  1. Dan Sorensen
    Dan Sorensen avatar
    256 posts
    13 Aug 2010
    15 Feb 2011
    Link to this post
    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.
  2. Nikolay Datchev
    Nikolay Datchev avatar
    87 posts
    01 Nov 2016
    21 Feb 2011
    Link to this post
    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
  3. Alex
    Alex avatar
    7 posts
    11 Oct 2012
    10 Jun 2013 in reply to Nikolay Datchev
    Link to this post
    Hi Nikolay Datchev,

    Can you share some sample code how to achieve this?

  4. Georgi Dimitrov
    Georgi Dimitrov avatar
    9 posts
    02 Jun 2017
    11 Jun 2013
    Link to this post
    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.

    Georgi Dimitrov
    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
4 posts, 1 answered