Orchard Query List Rendering - Remove ul li
Asked Answered
C

1

13

I am using the latest version of Orchard and have created a projection widget of three articles. I would like to display them in source terms directly after eachother:

 <article>content</article>  
 <article>content</article>  
 <article>content</article>

i.e. not contained in a list

<ul>  
<li>  
<article>content</article>  
</li>  
<li>  
<article>content</article>  
</li>  
</ul>

How can I strip out the list tags but leave the articles? I don't know how to edit the Model.List in the ProjectionPart.cshtml, if this is even the right file to be editing!?

I would really appreciate any help anyone could give me?

Caen answered 25/6, 2012 at 14:48 Comment(3)
I think this is a perfectly legitimate question. The question marks are quite easy to find and the words before them make sense. So here would be my answer if this had not been closed. Please read these two articles which explain how to take over the list rendering and replace the markup with whatever you want: weblogs.asp.net/bleroy/archive/2011/03/27/… weblogs.asp.net/bleroy/archive/2011/05/23/… Please note, this being said, that semantically ul/li is the right markup...Pusan
I second that, Bertrand. This question should be re-opened.Karelian
Thanks Bertrand. I thought it was a perfectly good question and was a bit confused when it was closed almost immediately! Thanks for your answer. I know it is semantically correct for a list but it depends on how broad your interpretation of a list is. Thanks againCaen
W
1

You can override the default behavior in your theme. As it commented Bertrand Le Roy you can find more info on these posts:

http://weblogs.asp.net/bleroy/archive/2011/03/27/taking-over-list-rendering-in-orchard.aspx

http://weblogs.asp.net/bleroy/archive/2011/05/23/orchard-list-customization-first-item-template.aspx

Waki answered 2/2, 2013 at 16:32 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.