Sebobo / Shel.Blog

A simple blog based on Fusion and Yaml configurations without PHP requirements
MIT License
12 stars 14 forks source link

Sorting the `BlogFeed` entries #3

Closed dgrammlich closed 7 years ago

dgrammlich commented 7 years ago

Hi @Sebobo,

thanks for your very cool and simple blog package. :) I use it in my website and wanted to sort the BlogFeed descending by date. The only way to do so was to write the following Fusion code:

prototype(Shel.Blog:BlogFeedContent) {
    feedEntries.@process {
        sort = ${q(value).sortBlogEntries('publicationDate', 'DESC').get()}
    }
}

screenshot from 2016-11-08 16-07-03

It would be nice to have a possibility in the inspector to configure it like in the LatestBlogEntries. :)

Thanks in advance!

Sebobo commented 7 years ago

This feature was actually prepared in the code for a long time but the field for selecting the sorting was missing ;) Released 2.1.0 including the change and a small template change.