2

I've followed the topic 'Creating lists' in the Orchard Project docs but I'm struggling to think how best to implement my preferred sort order and direction in the resulting rendering of Summary display of the content items.

For example, if I create a Book Reviews list as in the example, and I then add a Published Date field following the topic 'Creating a custom field type' then how would I alter my theme or the views in the Module to display (and possibly also filter) the content items by that custom field.

The 'Creating lists' topic discusses how widgets can implement sorting and filtering, but not how the main content type can do so.

p.s. if you know the answer to this you're probably well on the way to being able to implement an Event Calendar Module as suggested by the Orchard Module Challenge; why not have a go and stand a chance to win a TV / XBox / KINECT!

Research to date:

I've noticed that ordering in a Container part is implemented using the following property

OrderByProperty (Orchard.Core.Containers.Models.ContainerPartRecord)

4

1 に答える 1

1

Orchard 1.4 では、Projection Module を使用してそれを実現できます。

以前のバージョンでは、LINQ クエリを使用してカスタム フィールドの並べ替えを行っていました。

于 2012-05-30T02:07:46.947 に答える