This project is read-only.

How to Customize List rendering?

Topics: Customizing Orchard, Troubleshooting, Writing themes
Mar 27, 2011 at 4:18 PM
Edited Mar 27, 2011 at 4:20 PM


I'm trying to figure out how to put the title of a List Content Item in a template of my custom theme.
I'm still very new with Orchard, but it is my understanding that List is a Content Type consisting of a Routable part, which in turn has the Title property.

According to this documentation, I should be able to create a template named Content-List.cshtml and override the list rendering here, presumingly like this:


@ {

var routePart = Model.ContentItem.As<RoutePart>();




But whatever I try, the template doesn't seem to kick in, unless I rename the template to List.cshtml. But that will affect the lists being displayed in the Admin area as well, which of course is not very desirable.

Mar 27, 2011 at 5:45 PM

This is related to a known problem with Containers. You can see some details and a fix here:

Mar 27, 2011 at 6:27 PM

Ok thanks! That fix will work just fine for me.