More in this section
Forums / Developing with Sitefinity / Is it possible to define "no detail page" when outputting a module listing?

Is it possible to define "no detail page" when outputting a module listing?

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
5 posts, 0 answered
  1. Paul
    Paul avatar
    0 posts
    Registered:
    22 Dec 2015
    24 Oct 2017
    Link to this post

    A standard MVC widget in Sitfinity 9.2 will have the following two options within "single item settings"...

    * Auto-generated page
    * Selected existing page...

    If I am outputting listing items  that do not need to have a detail view at all, then I tend to just leave "Auto-generated page" selected as there is no existing page to select.

    The problem with this is that it becomes possible to navigate to the generated detail version of each item in the listing for example by navigating to something like: www.foowebsite.com/listing-page/listing-item-title

    This page will look visually broken as there will be no styling for the detail view.

    I know I can hide these URLs from the sitemap in Admin > Settings > Adv > Sitemap > Exclude Types.

    But hiding from the sitemap isn't really solving the issue. The URLs should go to 404.

  2. Nidhi
    Nidhi avatar
    40 posts
    Registered:
    20 Jul 2010
    24 Oct 2017 in reply to Paul
    Link to this post

    Can you try setting this:

    Go to the Advanced mode of your list widget, scroll to the bottom and find the property "ContentViewDisplayMode" - this should be showing you "Automatic" by default, set it to "Master". This will set the list widget to only display in list view mode, and navigating to details page url should throw 404 errors.

  3. Paul
    Paul avatar
    0 posts
    Registered:
    22 Dec 2015
    24 Oct 2017 in reply to Nidhi
    Link to this post

    Hi Nidhi,

     

    Thanks for your response, but I don't think MVC has a ContentViewDisplayMode :( option.

  4. Jonathan
    Jonathan avatar
    119 posts
    Registered:
    19 Dec 2012
    24 Oct 2017 in reply to Paul
    Link to this post

    Create a new template with no links to the details and hide them from sitemap as you pointed out. 

    I would create the new view in the file system following the feather naming conventions. Copy the template Sitefinity generated for MVC and paste into the file you created. Remove the links it used on the title and such.

  5. Paul
    Paul avatar
    0 posts
    Registered:
    22 Dec 2015
    25 Oct 2017 in reply to Jonathan
    Link to this post

    Hi Jonathan, thanks for your suggestion.

    My listing template already doesn't have GetDetailPageUrl.

    It does have links to internal pages though (item.Fields.InternalPageLink).

    But this is just any page in the site that the content author can select when editing the module item.

    There are no links to an actual detail item.

5 posts, 0 answered