+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Items Listing & Each Item Details with different layout for Dynamic Module Item

Items Listing & Each Item Details with different layout for Dynamic Module Item

4 posts, 0 answered
  1. zarni
    zarni avatar
    2 posts
    Registered:
    02 Jun 2014
    20 Jun 2014
    Link to this post

    Hi,

    I created "Staff" dynamic module and wants to develop custom listing and details widget.

    According to the video, http://www.youtube.com/watch?v=vxDgFeliUUo, we can achieve custom listing and details widget using mvc.

    However, I want different template layout for listing and details. In the example, they both show on the same template with same layout.

    I want to add and show other custom widgets to listing view but I do not want to add and show other custom widgets for details view.

    Please kindly advice how can I achieve what I want. Thanks a lot :)

  2. zarni
    zarni avatar
    2 posts
    Registered:
    02 Jun 2014
    20 Jun 2014
    Link to this post

    I managed to implement the listing and details widgets using ASP.NET web forms user controls (.ascx)

    I created separate widget for listing and details page. Listing widget is placed in listing page named "teaching staff" with it's own layout and other widgets. Details widget is placed in details page named "detail" with it's won layout and  other widgets as well. Details page is child page of listing page.

    Now everything is working as follows,

    Listing, /teaching-staff/

    Details, /teaching-staff/detail/peter-tan

    However, I do not want "/detail/" part in the details URL. I want details url to be like "/teaching-staff/peter-tan"

     Please kindly advice if there is a way to achieve this.

    Sorry for my bad explanation if it's not easy to comprehend.

    Thanks in advance.

  3. Kaloyan
    Kaloyan avatar
    272 posts
    Registered:
    30 Sep 2016
    23 Jun 2014
    Link to this post
    Hello Zarni,

    It all depends on your custom implementation. If your details widget is designed to display items in single view only you can place both list and detail widgets on the same page. Using this approach both views will be displayed on a single page. 

    You can also check and the following blog post which might be helpful.

    Custom URL Formats for Sitefinity Content Modules

    Other possible approach is to use URL rewrite. You can find more information from the following article:

    Using URL Rewrite for SEO

    Regards,
    Kaloyan
    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 Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
  4. Wojciech
    Wojciech avatar
    1 posts
    Registered:
    23 Jun 2015
    15 Oct 2015 in reply to Kaloyan
    Link to this post

    I just ran into the same scenario....Just wanted to give others a heads up about "Using URL Rewrite for SEO".  

     

    Just an FYI.  Outbound rules withOUT some additional filters (i.e. filterByTags="A"), made the back office...specifically "Pages" section unusable.

     Here are the rewrite rules that worked for me:

     <rewrite>
          <outboundRules>
            <rule name="Menu Detail" stopProcessing="true">
              <match filterByTags="A" pattern="(.*)/menu-detail/(.*)" />
              <action type="Rewrite" value="{R:1}/{R:2}" />
            </rule>
          </outboundRules>
        </rewrite>

     

4 posts, 0 answered