开发者

Orchard How can I style the summary of list items different in a page versus a widget

I am new to the orchard project, and have not been able to track down how this could be done (assuming its possible).

I have a data list called "Events" in which I have attached a list of custom data type objects which are of type "Event". I then have put a view of this list in a widget on my homepage - as well as displayed the list view page by adding it to my main menu.

I have found the information to update the summary of these list items by adding the pr开发者_StackOverflowoper view for example adding the following view:

\Themes\PeaceCamp\Views\Items\Content-Event.Summary.cshtml

<div class="event">
<b>@Model.Title</b><br />
</div>

however this seems to update the view in the widget, as well as in the list view page. Since pagination only affects the page view - I presume there is a way to summarize them different in the two different areas - hoping someone could explain or direct me to the proper location to do that - Thanks!

My solution is all local at this time, so I cannot provide links as examples - and the only thing not done in the CMS would be the view added above.


You could add your own IShapeTableProvider (the stuff you describe comes from the Shapes class in Orchard.Core.Contents) that walks up the shape tree to find a parent zone and adds alternates accordingly. This post might give you some ideas on how to do that: http://weblogs.asp.net/bleroy/archive/2011/01/10/orchard-shapeshifting.aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜