Override the rendering of a list that is a widget

Jan 30, 2011 at 6:48 PM

as per the title, I followed the Displaying book lists as widgets tutorial fine, and can modify individual items in the list, but I really want to be able to modify the list container itself.  i.e. change the ul and li items.  I am trying to create a widget that will allow some list items to render as http://spaceforaname.com/galleryview and the html arrangement of each item is quite different from a standard unordered list. 

Can anyone assist with how to override a specific widget list?

 

Regards

Matt

Jan 31, 2011 at 3:48 PM

written late on a sunday night, hoping someone might see it today and help :)

Coordinator
Jan 31, 2011 at 5:05 PM

The default rendering for the list shape can be found in CoreShapes.cs (the List shape method) but you can override it with a list template. You can also add alternates following the technique exposed in this post: http://weblogs.asp.net/bleroy/archive/2011/01/10/orchard-shapeshifting.aspx for specific occurrences of the List shape.

Feb 17, 2011 at 10:15 AM

I have the similar issue. The problem I see is that Container widget does not provide any information about List type Id that it displays to the list shape builder. As a result, there is no way to modify rendered <ul> style via linked CSS.

Coordinator
Feb 17, 2011 at 5:01 PM
Edited Feb 17, 2011 at 5:01 PM

Can you please file a bug? we have some work planned on lists for the next iteration and this could be part of it.

Feb 17, 2011 at 6:17 PM

Ok, will submit issue.