Is it possible to define "no detail page" when outputting a module listing?
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.
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.
Hi Nidhi,
Thanks for your response, but I don't think MVC has a ContentViewDisplayMode :( option.
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.
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.