How to display single custom content type

Posted by Community Admin on 05-Aug-2018 16:40

How to display single custom content type

All Replies

Posted by Community Admin on 27-Jun-2016 00:00

I have made a new module (Ideas).  In Widget templates (under design) I noticed 2 widgets were auto created.  One is list and the other detail.  So far so good.  When I go to the page and drag the content type from the right hand side it seems to only show the widget for list of ideas.  I don't want to show the list widget on my page.  On my page I want to simply show a single idea.  Is there a way to do this without hacking the list template to basically be a detail template?

Posted by Community Admin on 27-Jun-2016 00:00

I went about this my making the list template loop through each item with each item markup being the same as the detail basically.  Then on the page, edit the widget properties to limit the list to a single idea/content.

Posted by Community Admin on 01-Jul-2016 00:00

Hi Hooman,

In order to achieve your needs, and to get one particular Item in detail view, you need:
- Drop the widget of your type on the page
- Under its Edit menu select "One particular <your content type name> only..."
- Select the Item of your content type (screenshot) you need to display in details view
- Click Done and Save the settings.

Regards,
Svetoslav Manchev
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
 

Posted by Community Admin on 01-Jul-2016 00:00

I forgot to mention we are using MVC/feather.   When I drag my Promotions widget from the tool box to the page, there is no "One particular Promotion only...".  See attached  screenshot.  I can select a single item in the edit scren, however that still calls the list template with a single item. It doesn't display the detail template I have chosen (see screen shot) - in this case called "Static Promotion" which is just a simple div..   

Posted by Community Admin on 06-Jul-2016 00:00

Hi Hooman,

In that case you can select as you described a single Item and modify the list template to show the necessary fields you need:
- Go to Design > Widget templates 
- Create a custom list template where to include all the fields you need 
- Associate that template to your type (MVC)

You can get the respective code from the details view. Note that you need to change in that case "Model.Item.Fields..." to "item.Fields..."

I hope this helps.

Regards,
Svetoslav Manchev
Telerik by Progress

 
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
 

This thread is closed